react-better-html 1.1.224 → 1.1.225

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.mjs CHANGED
@@ -3685,7 +3685,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
3685
3685
  if (!withDebounce) return;
3686
3686
  onChangeSearch?.(debouncedSearchQuery);
3687
3687
  }, [withDebounce, onChangeSearch, debouncedSearchQuery]);
3688
- const displayValue = (withSearch && isFocused && searchQuery.length > 0 ? searchQuery : !Array.isArray(selectedOption) ? selectedOption?.label : void 0) ?? "";
3688
+ const displayValue = (withSearch && isFocused ? searchQuery : !Array.isArray(selectedOption) ? selectedOption?.label : void 0) ?? "";
3689
3689
  const withClearButton = isOpen && (Array.isArray(selectedOption) ? selectedOption.length > 0 : selectedOption);
3690
3690
  const readyPlaceholder = placeholder ?? `Select ${!withMultiselect ? "an " : ""}${label?.toLowerCase() ?? getPluralWord("option", withMultiselect ? 2 : 1)}`;
3691
3691
  return /* @__PURE__ */ jsx15(Div_default.column, { width: "100%", position: "relative", userSelect: "none", ...props, children: /* @__PURE__ */ jsx15(
@@ -3706,7 +3706,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
3706
3706
  leftIcon,
3707
3707
  autoComplete: "off",
3708
3708
  className: `react-better-html-dropdown${Array.isArray(selectedOption) && selectedOption.length > 0 ? " react-better-html-dropdown-multiselect" : ""}${isOpen ? " react-better-html-dropdown-open" : ""}${isOpenLate ? " react-better-html-dropdown-open-late" : ""}${inputFieldClassName ? ` ${inputFieldClassName}` : ""}`,
3709
- onClick: !disabled ? setIsOpen.toggle : void 0,
3709
+ onClick: !disabled ? withMultiselect ? setIsOpen.setTrue : setIsOpen.toggle : void 0,
3710
3710
  onFocus: setIsFocused.setTrue,
3711
3711
  onBlur: setIsFocused.setFalse,
3712
3712
  onKeyDown: onKeyDownInputField,