@vendorflow/components 2.1.0 → 2.1.1
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.
|
@@ -55,7 +55,7 @@ var useStyles = (0, styles_1.makeStyles)({
|
|
|
55
55
|
},
|
|
56
56
|
});
|
|
57
57
|
function InputSearchDropdown(props) {
|
|
58
|
-
var mRef = props.mRef, _a = props.autoHighlight, autoHighlight = _a === void 0 ? true : _a, _b = props.clearOnEscape, clearOnEscape = _b === void 0 ? true : _b, count = props.count, disableFilter = props.disableFilter, error = props.error, errors = props.errors, filterOptions = props.filterOptions, _c = props.filterSelectedOptions, filterSelectedOptions = _c === void 0 ? true : _c, getKey = props.getKey, label = props.label, helperText = props.helperText, name = props.name, onChange = props.onChange, _d = props.openOnFocus, openOnFocus = _d === void 0 ? true : _d, _e = props.renderInput, renderInput = _e === void 0 ? null : _e, renderOption = props.renderOption, renderTags = props.renderTags, _f = props.selectOnFocus, selectOnFocus = _f === void 0 ? true : _f, _g = props.variant, variant = _g === void 0 ? 'outlined' : _g, multiple = props.multiple, max = props.max, autoFocus = props.autoFocus, _h = props.size, size = _h === void 0 ? 'small' : _h, restOfProps = __rest(props, ["mRef", "autoHighlight", "clearOnEscape", "count", "disableFilter", "error", "errors", "filterOptions", "filterSelectedOptions", "getKey", "label", "helperText", "name", "onChange", "openOnFocus", "renderInput", "renderOption", "renderTags", "selectOnFocus", "variant", "multiple", "max", "autoFocus", "size"]);
|
|
58
|
+
var mRef = props.mRef, _a = props.autoHighlight, autoHighlight = _a === void 0 ? true : _a, _b = props.clearOnEscape, clearOnEscape = _b === void 0 ? true : _b, count = props.count, disableFilter = props.disableFilter, error = props.error, errors = props.errors, filterOptions = props.filterOptions, _c = props.filterSelectedOptions, filterSelectedOptions = _c === void 0 ? true : _c, getKey = props.getKey, label = props.label, placeholder = props.placeholder, helperText = props.helperText, name = props.name, onChange = props.onChange, _d = props.openOnFocus, openOnFocus = _d === void 0 ? true : _d, _e = props.renderInput, renderInput = _e === void 0 ? null : _e, renderOption = props.renderOption, renderTags = props.renderTags, _f = props.selectOnFocus, selectOnFocus = _f === void 0 ? true : _f, _g = props.variant, variant = _g === void 0 ? 'outlined' : _g, multiple = props.multiple, max = props.max, autoFocus = props.autoFocus, _h = props.size, size = _h === void 0 ? 'small' : _h, restOfProps = __rest(props, ["mRef", "autoHighlight", "clearOnEscape", "count", "disableFilter", "error", "errors", "filterOptions", "filterSelectedOptions", "getKey", "label", "placeholder", "helperText", "name", "onChange", "openOnFocus", "renderInput", "renderOption", "renderTags", "selectOnFocus", "variant", "multiple", "max", "autoFocus", "size"]);
|
|
59
59
|
var id = (0, react_2.useRef)((0, nanoid_1.nanoid)());
|
|
60
60
|
var _j = __read((0, react_2.useState)(null), 2), value = _j[0], setValue = _j[1];
|
|
61
61
|
var mainStyles = useStyles();
|
|
@@ -101,7 +101,7 @@ function InputSearchDropdown(props) {
|
|
|
101
101
|
});
|
|
102
102
|
}, [getKeySuffix, getOptionLabel, errors]);
|
|
103
103
|
var renderDefaultInput = (0, react_2.useCallback)(function (params) {
|
|
104
|
-
return ((0, react_1.jsx)(material_1.TextField, __assign({}, params, { error: error || !!(errors === null || errors === void 0 ? void 0 : errors.length), label: label, variant: variant, autoFocus: autoFocus })));
|
|
104
|
+
return ((0, react_1.jsx)(material_1.TextField, __assign({}, params, { error: error || !!(errors === null || errors === void 0 ? void 0 : errors.length), label: label, placeholder: placeholder, variant: variant, autoFocus: autoFocus })));
|
|
105
105
|
}, [error, errors, label, variant, autoFocus]);
|
|
106
106
|
(0, react_2.useEffect)(function () {
|
|
107
107
|
if (props.value !== value) {
|