@dragonmastery/zinia-forms-core 0.4.2 → 0.4.4

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/index.js CHANGED
@@ -8458,17 +8458,13 @@ var ComboboxFilter = (props) => {
8458
8458
  if (!searchQuery.value.trim()) return false;
8459
8459
  if (props.allowCreate) return false;
8460
8460
  const query = searchQuery.value.trim();
8461
- return !props.options.some((opt) => opt.label.toLowerCase() === query.toLowerCase());
8461
+ return filteredOptions.value.length === 0 && !props.options.some((opt) => opt.label.toLowerCase() === query.toLowerCase());
8462
8462
  });
8463
8463
  const handleInput = (e) => {
8464
8464
  const value = e.target.value;
8465
8465
  props.filterInputValues.value[props.field] = value;
8466
8466
  state.isOpen = true;
8467
8467
  state.selectedIndex = -1;
8468
- const exactMatch = props.options.find((opt) => opt.label.toLowerCase() === value.toLowerCase().trim());
8469
- if (exactMatch) {
8470
- props.onFilterChange(props.field, exactMatch.value, "eq");
8471
- }
8472
8468
  };
8473
8469
  const handleSelectOption = (option) => {
8474
8470
  props.filterInputValues.value[props.field] = option.label;