@etsoo/materialui 1.1.33 → 1.1.35
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/ComboBox.js +2 -9
- package/package.json +1 -1
- package/src/ComboBox.tsx +2 -9
package/lib/ComboBox.js
CHANGED
|
@@ -62,7 +62,7 @@ export function ComboBox(props) {
|
|
|
62
62
|
React.useEffect(() => {
|
|
63
63
|
if (localValue != null)
|
|
64
64
|
setStateValue(localValue);
|
|
65
|
-
}, [localValue]);
|
|
65
|
+
}, [JSON.stringify(localValue) != JSON.stringify(stateValue)]);
|
|
66
66
|
// Add readOnly
|
|
67
67
|
const addReadOnly = (params) => {
|
|
68
68
|
if (readOnly != null) {
|
|
@@ -117,14 +117,7 @@ export function ComboBox(props) {
|
|
|
117
117
|
}
|
|
118
118
|
setOptions(result);
|
|
119
119
|
});
|
|
120
|
-
}, [
|
|
121
|
-
propertyWay,
|
|
122
|
-
loadData,
|
|
123
|
-
onLoadData,
|
|
124
|
-
autoAddBlankItem,
|
|
125
|
-
idField,
|
|
126
|
-
labelField
|
|
127
|
-
]);
|
|
120
|
+
}, [propertyWay, autoAddBlankItem, idField, labelField]);
|
|
128
121
|
React.useEffect(() => {
|
|
129
122
|
return () => {
|
|
130
123
|
isMounted.current = false;
|
package/package.json
CHANGED
package/src/ComboBox.tsx
CHANGED
|
@@ -174,7 +174,7 @@ export function ComboBox<
|
|
|
174
174
|
|
|
175
175
|
React.useEffect(() => {
|
|
176
176
|
if (localValue != null) setStateValue(localValue);
|
|
177
|
-
}, [localValue]);
|
|
177
|
+
}, [JSON.stringify(localValue) != JSON.stringify(stateValue)]);
|
|
178
178
|
|
|
179
179
|
// Add readOnly
|
|
180
180
|
const addReadOnly = (params: AutocompleteRenderInputParams) => {
|
|
@@ -235,14 +235,7 @@ export function ComboBox<
|
|
|
235
235
|
}
|
|
236
236
|
setOptions(result);
|
|
237
237
|
});
|
|
238
|
-
}, [
|
|
239
|
-
propertyWay,
|
|
240
|
-
loadData,
|
|
241
|
-
onLoadData,
|
|
242
|
-
autoAddBlankItem,
|
|
243
|
-
idField,
|
|
244
|
-
labelField
|
|
245
|
-
]);
|
|
238
|
+
}, [propertyWay, autoAddBlankItem, idField, labelField]);
|
|
246
239
|
|
|
247
240
|
React.useEffect(() => {
|
|
248
241
|
return () => {
|