@mailstep/design-system 0.7.6-beta.5 → 0.7.6
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/package.json
CHANGED
|
@@ -5,7 +5,6 @@ type Props = {
|
|
|
5
5
|
options?: ColumnDefinition['filterOptions'];
|
|
6
6
|
value?: string | string[];
|
|
7
7
|
checkAllButton?: boolean;
|
|
8
|
-
isClearable?: boolean;
|
|
9
8
|
};
|
|
10
|
-
declare const SelectFilter: ({ onChange, isMulti, value, options, checkAllButton
|
|
9
|
+
declare const SelectFilter: ({ onChange, isMulti, value, options, checkAllButton }: Props) => JSX.Element;
|
|
11
10
|
export default SelectFilter;
|
|
@@ -5,7 +5,7 @@ import SingleSelect from '../../../../../Elements/SingleSelect';
|
|
|
5
5
|
import isArray from 'lodash/isArray';
|
|
6
6
|
var emptyValue = [];
|
|
7
7
|
var SelectFilter = function (_a) {
|
|
8
|
-
var onChange = _a.onChange, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton
|
|
8
|
+
var onChange = _a.onChange, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton;
|
|
9
9
|
var handleOnMultiChange = useCallback(function (options) {
|
|
10
10
|
onChange === null || onChange === void 0 ? void 0 : onChange(!isArray(options) || !(options === null || options === void 0 ? void 0 : options.length) ? null : options.map(function (option) { return option.value; }));
|
|
11
11
|
}, [onChange]);
|
|
@@ -13,7 +13,7 @@ var SelectFilter = function (_a) {
|
|
|
13
13
|
return (_jsx(MultiSelect, { maxMenuHeight: 250, onChange: handleOnMultiChange, value: value || emptyValue, options: options, checkAllButton: checkAllButton, style: "gridFilter" }));
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
|
-
return _jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: value, options: options, style: "gridFilter"
|
|
16
|
+
return _jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: value, options: options, style: "gridFilter" });
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
export default SelectFilter;
|