From 50df42cc14b64e5283ce35abfda7e62dddd6935c Mon Sep 17 00:00:00 2001 From: Manuel Ruwe Date: Sun, 11 Dec 2022 20:51:10 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Use=20debouncer=20for=20se?= =?UTF-8?q?rvice=20name=20propagation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tabs/AppereanceTab/IconSelector/IconSelector.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Dashboard/Modals/EditService/Tabs/AppereanceTab/IconSelector/IconSelector.tsx b/src/components/Dashboard/Modals/EditService/Tabs/AppereanceTab/IconSelector/IconSelector.tsx index 4d4e10b2d..2b4f9f640 100644 --- a/src/components/Dashboard/Modals/EditService/Tabs/AppereanceTab/IconSelector/IconSelector.tsx +++ b/src/components/Dashboard/Modals/EditService/Tabs/AppereanceTab/IconSelector/IconSelector.tsx @@ -53,7 +53,7 @@ export const IconSelector = ({ } const matchingDebouncedIcon = data?.find( - (x) => replaceCharacters(x.fileName.split('.')[0]) === replaceCharacters(form.values.name) + (x) => replaceCharacters(x.fileName.split('.')[0]) === replaceCharacters(debouncedValue) ); if (!matchingDebouncedIcon) { @@ -61,7 +61,7 @@ export const IconSelector = ({ } form.setFieldValue('appearance.iconUrl', matchingDebouncedIcon.url); - }, [form.values.name]); + }, [debouncedValue]); if (isLoading || !data) { return ;