️ Use debouncer for service name propagation

This commit is contained in:
Manuel Ruwe
2022-12-11 20:51:10 +01:00
parent c7719b7ad0
commit 50df42cc14

View File

@@ -53,7 +53,7 @@ export const IconSelector = ({
} }
const matchingDebouncedIcon = data?.find( const matchingDebouncedIcon = data?.find(
(x) => replaceCharacters(x.fileName.split('.')[0]) === replaceCharacters(form.values.name) (x) => replaceCharacters(x.fileName.split('.')[0]) === replaceCharacters(debouncedValue)
); );
if (!matchingDebouncedIcon) { if (!matchingDebouncedIcon) {
@@ -61,7 +61,7 @@ export const IconSelector = ({
} }
form.setFieldValue('appearance.iconUrl', matchingDebouncedIcon.url); form.setFieldValue('appearance.iconUrl', matchingDebouncedIcon.url);
}, [form.values.name]); }, [debouncedValue]);
if (isLoading || !data) { if (isLoading || !data) {
return <Loader />; return <Loader />;