@etsoo/materialui 1.2.30 → 1.2.31
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/ComboBoxPro.js +5 -2
- package/package.json +1 -1
- package/src/ComboBoxPro.tsx +5 -2
package/lib/ComboBoxPro.js
CHANGED
|
@@ -47,8 +47,11 @@ export function ComboBoxPro(props) {
|
|
|
47
47
|
}, onClose: () => {
|
|
48
48
|
setOpen(false);
|
|
49
49
|
}, options: localOptions, loading: loading, openOnFocus: openOnFocus, renderInput: (params) => (React.createElement(InputField, { ...inputProps, ...params, label: label, name: name, onBlur: (event) => {
|
|
50
|
-
if (
|
|
51
|
-
|
|
50
|
+
if (onChange) {
|
|
51
|
+
const value = event.target.value;
|
|
52
|
+
if (!localValue && localValue != value)
|
|
53
|
+
onChange(event, value, "blur", undefined);
|
|
54
|
+
}
|
|
52
55
|
} })), getOptionLabel: (item) => typeof item === "object"
|
|
53
56
|
? "label" in item
|
|
54
57
|
? item.label
|
package/package.json
CHANGED
package/src/ComboBoxPro.tsx
CHANGED
|
@@ -121,8 +121,11 @@ export function ComboBoxPro<D extends ListType2 = ListType2>(
|
|
|
121
121
|
label={label}
|
|
122
122
|
name={name}
|
|
123
123
|
onBlur={(event) => {
|
|
124
|
-
if (
|
|
125
|
-
|
|
124
|
+
if (onChange) {
|
|
125
|
+
const value = event.target.value;
|
|
126
|
+
if (!localValue && localValue != value)
|
|
127
|
+
onChange(event, value, "blur", undefined);
|
|
128
|
+
}
|
|
126
129
|
}}
|
|
127
130
|
/>
|
|
128
131
|
)}
|