Skip to content

Commit

Permalink
get value from event.target
Browse files Browse the repository at this point in the history
  • Loading branch information
michalczaplinski committed Oct 17, 2024
1 parent 9f2329b commit 87f5d00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/block-library/src/search/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import { store, getContext, getElement } from '@wordpress/interactivity';


const { state, actions } = store(
'core/search',
{
Expand Down Expand Up @@ -78,9 +77,8 @@ const { state, actions } = store(
actions.closeSearchInput();
}
},
*updateSearch() {
const { ref } = getElement();
const { value } = ref;
*updateSearch( e ) {
const { value } = e.target;

// Don't navigate if the search didn't really change.
if ( value === state.search ) {
Expand Down

0 comments on commit 87f5d00

Please sign in to comment.