sales-frontend-components 0.0.149 → 0.0.150

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.cjs.js CHANGED
@@ -1025,17 +1025,13 @@ const useCustomerSearch = (onSelect) => {
1025
1025
  }
1026
1026
  };
1027
1027
  const onKeyUp = (e) => {
1028
- if (e.key === "Enter") {
1028
+ const currentValue = e.target.value;
1029
+ if (currentValue.length === 0 || currentValue.slice(-1).normalize("NFD").length > 1 && currentValue.length > 1) {
1029
1030
  search();
1030
1031
  }
1031
1032
  };
1032
1033
  const onSearchInputChange = (e) => {
1033
1034
  setSearchInput(e.target.value);
1034
- if (e.target.value.length < 2) {
1035
- setCustomerList([]);
1036
- setSearchKeyword("");
1037
- setIsOpen(false);
1038
- }
1039
1035
  };
1040
1036
  const onClear = () => {
1041
1037
  setSearchInput("");