@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.
@@ -2580,7 +2580,7 @@ function useListController({ suggestions, automatic, formControl, reference }) {
2580
2580
  ...state,
2581
2581
  value: element?.description || ''
2582
2582
  }));
2583
- changeValueInternal.current = true;
2583
+ changeValueInternal.current = !Object.is(element?.value, formControl?.value);
2584
2584
  if (valueIsDefault) {
2585
2585
  formControl?.setDefaultValue(element?.value);
2586
2586
  }
@@ -2610,6 +2610,9 @@ function useListController({ suggestions, automatic, formControl, reference }) {
2610
2610
  if (element) {
2611
2611
  setFormValue(element);
2612
2612
  }
2613
+ else if (automatic) {
2614
+ setFormValue(collection.value[0], true);
2615
+ }
2613
2616
  else {
2614
2617
  refreshState((state) => ({ ...state, value: '' }));
2615
2618
  }