Skip to content
Snippets Groups Projects
Commit 1acb794c authored by chris's avatar chris
Browse files

rearch again on each change

parent 82c57b5f
No related branches found
No related tags found
1 merge request!190Find and replace
......@@ -101,17 +101,16 @@ const FindComponent = ({ close, expand, setPreviousSearcValue }) => {
useEffect(() => {
delayedSearch();
}, [searchValue, delayedSearch]);
}, [searchValue, delayedSearch, JSON.stringify(main.state)]);
const searchDocument = () => {
setCounterText('0 of 0');
console.log('search');
const results = helpers.getMatchesByView(
view,
searchValue,
findAndReplacePlugin,
);
console.log('search');
if (results > 0) {
setCounterText(`1 of ${results}`);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment