odaptos_design_system 2.0.218 → 2.0.219

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.
@@ -53540,14 +53540,17 @@ const SingleSelect = ({
53540
53540
  }));
53541
53541
  },
53542
53542
  filterOptions: (options, params) => {
53543
- // If the user typed something, we use fullOptions for the search
53544
- const searchOptions = params.inputValue && fullOptions ? fullOptions : options;
53545
- const filtered = filter$2(searchOptions, params);
53543
+ // Si l'utilisateur tape quelque chose et qu'on a fullOptions, on utilise fullOptions
53544
+ if (params.inputValue && fullOptions) {
53545
+ return filter$2(fullOptions, params);
53546
+ }
53547
+ // Sinon on filtre normalement les options principales
53548
+ const filtered = filter$2(options, params);
53546
53549
  const {
53547
53550
  inputValue
53548
53551
  } = params;
53549
53552
  // Suggest the creation of a new value
53550
- const isExisting = searchOptions.some(option => inputValue === option.title);
53553
+ const isExisting = options.some(option => inputValue === option.label);
53551
53554
  if (inputValue !== '' && !isExisting) {
53552
53555
  if (canAddNewOption) filtered.push({
53553
53556
  value: inputValue,