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