From 238ca0f7f1673e2fa11815250521e51338e9bd05 Mon Sep 17 00:00:00 2001 From: Ian Svoboda Date: Wed, 18 Dec 2024 16:24:56 -0500 Subject: [PATCH] Added tweak to prevent extra updates when tag changes --- src/dynamic-tags/components/DynamicTagSelect.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dynamic-tags/components/DynamicTagSelect.jsx b/src/dynamic-tags/components/DynamicTagSelect.jsx index 2aae5ba45..f6218228c 100644 --- a/src/dynamic-tags/components/DynamicTagSelect.jsx +++ b/src/dynamic-tags/components/DynamicTagSelect.jsx @@ -360,7 +360,7 @@ export function DynamicTagSelect( { onInsert, tagName, selectedText, currentPost * appropriate values. */ useEffect( () => { - if ( ! selectedText ) { + if ( ! selectedText || dynamicTag ) { return; } @@ -447,7 +447,7 @@ export function DynamicTagSelect( { onInsert, tagName, selectedText, currentPost if ( extraParams ) { setExtraTagParams( extraParams ); } - }, [ selectedText, tagSupportsMeta ] ); + }, [ selectedText, dynamicTag ] ); const dynamicTagOptions = useMemo( () => { const groups = Object.values( availableTags ).reduce( ( acc, { type, title, tag } ) => {