@rolster/react-components 19.8.17 → 19.8.18
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/dist/es/index.mjs
CHANGED
|
@@ -2578,7 +2578,7 @@ function useListController({ suggestions, automatic, formControl, reference }) {
|
|
|
2578
2578
|
...state,
|
|
2579
2579
|
value: element?.description || ''
|
|
2580
2580
|
}));
|
|
2581
|
-
changeValueInternal.current =
|
|
2581
|
+
changeValueInternal.current = !Object.is(element?.value, formControl?.value);
|
|
2582
2582
|
if (valueIsDefault) {
|
|
2583
2583
|
formControl?.setDefaultValue(element?.value);
|
|
2584
2584
|
}
|
|
@@ -2608,6 +2608,9 @@ function useListController({ suggestions, automatic, formControl, reference }) {
|
|
|
2608
2608
|
if (element) {
|
|
2609
2609
|
setFormValue(element);
|
|
2610
2610
|
}
|
|
2611
|
+
else if (automatic) {
|
|
2612
|
+
setFormValue(collection.value[0], true);
|
|
2613
|
+
}
|
|
2611
2614
|
else {
|
|
2612
2615
|
refreshState((state) => ({ ...state, value: '' }));
|
|
2613
2616
|
}
|