How to get the selected option in data-wp-each #64135
Closed
webconstructor
started this conversation in
Interactivity API
Replies: 2 comments 1 reply
-
As I can from the code you have used |
Beta Was this translation helpful? Give feedback.
0 replies
-
The bound function is an event handler, so I'd use the event to access the target element and read its value: {
setYear: ( event ) => {
console.log( event.target.value ); // "2024"
},
} (The example you shared mixes |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to trigger an action on the value of a selected option but it's unclear how to retrieve that value in the store.
render.php:
view.js
I cannot find any usefull string to pull on...
Can someone show me the way to do this?
Beta Was this translation helpful? Give feedback.
All reactions