TypeRocket / core

TypeRocket core source files where all the magic lives.
https://typerocket.com
36 stars 21 forks source link

Search field: Trigger change event on hidden field after setting ID #66

Closed marbetschar closed 4 years ago

marbetschar commented 4 years ago

I'd love to link the search field to another field, where the value should be set dynamically depending on whatever is selected in the search field.

For this, I'd love to bind the on change event of the hidden input field which receives the ID of the selected post type. But unfortunately this event is never fired.

According to this thread on StackOverflow the on change event of an input field must be triggered manually.

Any chance you can add this triggering in your code for selecting and removing a post type?

https://github.com/TypeRocket/core/blob/a5311cc7d20dd6ff795b2008952de79b343d8896/assets/js/tooling/search.js#L51-L56