@etsoo/materialui 1.1.69 → 1.1.70
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/lib/Tiplist.js +2 -2
- package/package.json +1 -1
- package/src/Tiplist.tsx +0 -2
package/lib/Tiplist.js
CHANGED
|
@@ -15,7 +15,7 @@ export function Tiplist(props) {
|
|
|
15
15
|
// Labels
|
|
16
16
|
const { noOptions, loading, more, open: openDefault } = (_a = globalApp === null || globalApp === void 0 ? void 0 : globalApp.getLabels("noOptions", "loading", "more", "open")) !== null && _a !== void 0 ? _a : {};
|
|
17
17
|
// Destruct
|
|
18
|
-
const { search = false, idField = "id", idValue, inputAutoComplete = "new-password", inputError, inputHelperText, inputMargin, inputOnChange, inputRequired, inputVariant, label, loadData, defaultValue, value, maxItems = 16, name, readOnly, onChange, openOnFocus = true,
|
|
18
|
+
const { search = false, idField = "id", idValue, inputAutoComplete = "new-password", inputError, inputHelperText, inputMargin, inputOnChange, inputRequired, inputVariant, label, loadData, defaultValue, value, maxItems = 16, name, readOnly, onChange, openOnFocus = true, noOptionsText = noOptions, loadingText = loading, openText = openDefault, getOptionLabel, getOptionDisabled, ...rest } = props;
|
|
19
19
|
// Value input ref
|
|
20
20
|
const inputRef = React.createRef();
|
|
21
21
|
// Local value
|
|
@@ -156,7 +156,7 @@ export function Tiplist(props) {
|
|
|
156
156
|
open: false,
|
|
157
157
|
...(!states.value && { options: [] })
|
|
158
158
|
});
|
|
159
|
-
}, loading: states.loading,
|
|
159
|
+
}, loading: states.loading, renderInput: (params) => search ? (React.createElement(SearchField, { onChange: changeHandle, ...addReadOnly(params), readOnly: readOnly, label: label, name: name + "Input", margin: inputMargin, variant: inputVariant, required: inputRequired, autoComplete: inputAutoComplete, error: inputError, helperText: inputHelperText })) : (React.createElement(InputField, { onChange: changeHandle, ...addReadOnly(params), label: label, name: name + "Input", margin: inputMargin, variant: inputVariant, required: inputRequired, autoComplete: inputAutoComplete, error: inputError, helperText: inputHelperText })), isOptionEqualToValue: (option, value) => option[idField] === value[idField], noOptionsText: noOptionsText, loadingText: loadingText, openText: openText, getOptionDisabled: (item) => {
|
|
160
160
|
if (item[idField] === "n/a")
|
|
161
161
|
return true;
|
|
162
162
|
return getOptionDisabled ? getOptionDisabled(item) : false;
|
package/package.json
CHANGED
package/src/Tiplist.tsx
CHANGED
|
@@ -75,7 +75,6 @@ export function Tiplist<
|
|
|
75
75
|
readOnly,
|
|
76
76
|
onChange,
|
|
77
77
|
openOnFocus = true,
|
|
78
|
-
sx = { minWidth: "180px" },
|
|
79
78
|
noOptionsText = noOptions,
|
|
80
79
|
loadingText = loading,
|
|
81
80
|
openText = openDefault,
|
|
@@ -282,7 +281,6 @@ export function Tiplist<
|
|
|
282
281
|
});
|
|
283
282
|
}}
|
|
284
283
|
loading={states.loading}
|
|
285
|
-
sx={sx}
|
|
286
284
|
renderInput={(params) =>
|
|
287
285
|
search ? (
|
|
288
286
|
<SearchField
|