Skip to content

Commit

Permalink
feat: clear rewrite on clear search
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme committed Apr 15, 2024
1 parent e7e1049 commit 7fc5ba1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ function ReplaceBar() {
const { searching, groupedByFileSearchResult } = useSearchResult()
const disabled =
!rewrite || searching || groupedByFileSearchResult.length === 0
// sadly unport does not support unsub
useEffectOnce(() => {
childPort.onMessage('clearSearchResults', () => {
setRewrite('')
})
})
return (
<div {...stylex.props(styles.replaceToolbar)}>
<SearchInput
Expand Down

0 comments on commit 7fc5ba1

Please sign in to comment.