diff --git a/CHANGELOG.md b/CHANGELOG.md index 15cf913..4aa5d1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.8.0 * Feat: Add Search & Replace feature for table head, foot & caption. +* Fix: Reset replace input field. * Tested up to WP 6.8. ## 1.7.0 diff --git a/src/core/app.tsx b/src/core/app.tsx index 801af19..2e18803 100644 --- a/src/core/app.tsx +++ b/src/core/app.tsx @@ -40,7 +40,7 @@ const SearchReplaceForBlockEditor = (): JSX.Element => { const [ caseSensitive, setCaseSensitive ] = useState< boolean >( false ); const [ context, setContext ] = useState< boolean >( false ); - // Reference to the first field inside the modal + // Reference to the first field inside the modal. const searchFieldRef = useRef< HTMLInputElement | null >( null ); /** @@ -58,10 +58,11 @@ const SearchReplaceForBlockEditor = (): JSX.Element => { .getSelection() .toString(); - // By default, reset count and search input. + // By default, reset count, search & replace inputs. if ( ! selectedText ) { setReplacements( 0 ); setSearchInput( '' ); + setReplaceInput( '' ); } };