Marketplace: Reset search input when tab changes (#40160)

This commit is contained in:
And Finally 2023-09-22 16:55:16 +01:00 committed by GitHub
commit be6982432e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,8 @@ function Search(): JSX.Element {
useEffect( () => { useEffect( () => {
if ( query.term ) { if ( query.term ) {
setSearchTerm( query.term ); setSearchTerm( query.term );
} else {
setSearchTerm( '' );
} }
}, [ query.term ] ); }, [ query.term ] );

View File

@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Reset search input when switching between tabs in the marketplace page