mozrest-sdk-react-dev 0.1.5 → 0.1.7

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/mozrest-sdk.es.js CHANGED
@@ -47810,13 +47810,11 @@ const AddressAutoComplete = () => {
47810
47810
  const { t: t2 } = useTranslation();
47811
47811
  const [suggestions, setSuggestions] = useState([]);
47812
47812
  const { setFieldValue } = useFormikContext();
47813
+ useState();
47813
47814
  const ref = useRef(null);
47814
47815
  const clearSuggestions = () => setSuggestions([]);
47815
47816
  useOutsideClick(ref, clearSuggestions);
47816
- const handelChandeAddress = async (e3) => {
47817
- var _a2;
47818
- console.log("textAddr", e3.target);
47819
- const textAddr = (_a2 = e3.target) == null ? void 0 : _a2.value;
47817
+ const handelChandeAddress = async (textAddr) => {
47820
47818
  setFieldValue("address", textAddr);
47821
47819
  if (textAddr.length < 5) {
47822
47820
  return;
@@ -47832,7 +47830,13 @@ const AddressAutoComplete = () => {
47832
47830
  value: item2
47833
47831
  })));
47834
47832
  };
47835
- const handelLoadSuggestions = debounce_1(handelChandeAddress, 700);
47833
+ const handelLoadSuggestions = (e3) => {
47834
+ e3.persist();
47835
+ setTimeout(() => {
47836
+ var _a2;
47837
+ void handelChandeAddress((_a2 = e3.target) == null ? void 0 : _a2.value);
47838
+ }, 700);
47839
+ };
47836
47840
  const onSelectSuggestion = ({ value: value2 }) => {
47837
47841
  setFieldValue("lat", value2.location.lat);
47838
47842
  setFieldValue("lng", value2.location.lng);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mozrest-sdk-react-dev",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "main": "mozrest-sdk.es.js",
5
5
  "keywords": ["mozrest"],
6
6
  "author": {