@seeqdev/qomponents 0.0.86 → 0.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Select/Select.types.d.ts +9 -1
- package/dist/index.esm.js +4 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/utils/validateStyleDimension.js +0 -14
- package/dist/utils/validateStyleDimension.js.map +0 -1
- package/dist/utils/validateStyleDimension.test.js +0 -20
- package/dist/utils/validateStyleDimension.test.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GroupBase, MenuPlacement, MultiValue, SingleValue } from 'react-select';
|
|
1
|
+
import { GroupBase, InputActionMeta, MenuPlacement, MultiValue, SingleValue } from 'react-select';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { InputGroupPlacement } from '../types';
|
|
4
4
|
export type Option = {
|
|
@@ -76,4 +76,12 @@ export interface SelectProps {
|
|
|
76
76
|
onMenuClose?: () => void;
|
|
77
77
|
/** custom components to be used in the select */
|
|
78
78
|
components?: Partial<any>;
|
|
79
|
+
/** custom handle for on menu input focus events in select */
|
|
80
|
+
onMenuInputFocus?: (inputValue: string) => void;
|
|
81
|
+
/** custom handle for on input change events for the select - this is different from onChange which is only called
|
|
82
|
+
* when an option is selected - this event is called whenever something about the select changes; the action
|
|
83
|
+
* tells you what changed */
|
|
84
|
+
onInputChange?: (inputValue: string, action: InputActionMeta) => void;
|
|
85
|
+
/** value of the search input */
|
|
86
|
+
inputValue?: string;
|
|
79
87
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -13729,7 +13729,7 @@ const multiValueStyles = [
|
|
|
13729
13729
|
* For ease of testing most of the elements of this select can be identified by classNames prefixed with "spec".
|
|
13730
13730
|
*
|
|
13731
13731
|
*/
|
|
13732
|
-
const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no matching options', isSearchable = true, creatable = false, isMulti = false, isClearable = false, closeMenuOnSelect = true, id, inputId, menuPortalTarget, getOptionLabel, getSelectedValueLabel, getOptionValue, onChange, menuIsOpen, menuPlacement = 'auto', extraClassNames, inputGroup, filterConfig, filterOption, small = false, isDisabled = false, showError = false, isLoading = false, formatGroupLabel, onRemove, defaultValue, onMenuOpen, onMenuClose, components }) => {
|
|
13732
|
+
const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no matching options', isSearchable = true, creatable = false, isMulti = false, isClearable = false, closeMenuOnSelect = true, id, inputId, menuPortalTarget, getOptionLabel, getSelectedValueLabel, getOptionValue, onChange, menuIsOpen, menuPlacement = 'auto', extraClassNames, inputGroup, filterConfig, filterOption, small = false, isDisabled = false, showError = false, isLoading = false, formatGroupLabel, onRemove, defaultValue, onMenuOpen, onMenuClose, components, onMenuInputFocus, onInputChange, inputValue }) => {
|
|
13733
13733
|
const getOptionOrSelectedLabel = (option, { context }) => {
|
|
13734
13734
|
const getSelectedOptionLabel = getSelectedValueLabel ? getSelectedValueLabel : getOptionLabel;
|
|
13735
13735
|
if (getOptionLabel || getSelectedValueLabel) {
|
|
@@ -13777,6 +13777,9 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
13777
13777
|
onMenuOpen,
|
|
13778
13778
|
onMenuClose,
|
|
13779
13779
|
components,
|
|
13780
|
+
onMenuInputFocus,
|
|
13781
|
+
onInputChange,
|
|
13782
|
+
inputValue,
|
|
13780
13783
|
hideSelectedOptions: isMulti,
|
|
13781
13784
|
filterOption: filterOption ? filterOption : filterConfig ? createFilter(filterConfig) : undefined,
|
|
13782
13785
|
classNames: {
|