Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onChange and initialValueSet #6

Merged
merged 3 commits into from
Apr 25, 2020
Merged

onChange and initialValueSet #6

merged 3 commits into from
Apr 25, 2020

Conversation

nickevansuk
Copy link
Contributor

This is a great project that we've been recommending to a few others too!

This PR fills a couple of gaps that we needed for our implementation:

  • We needed a callback that is called when an item is selected
  • We needed the dropdown to respect the initial value of the hidden field when it initialises

This PR implements two new options (which are backwards compatible):

onChange

This is a callback that is called when a selection is made, which includes the value selected.

initialValueSet

This boolean configures the dropdown to use the existing value in the hidden field when it initialises, rather than overwriting it with the default item

@NeoFusion NeoFusion merged commit da821d6 into NeoFusion:v2 Apr 25, 2020
@nickevansuk
Copy link
Contributor Author

Thanks @NeoFusion ! Could you also update https://github.com/NeoFusion/hierarchy-select/tree/gh-pages so we can make use of it in our JSFiddle demos?

@NeoFusion
Copy link
Owner

@nickevansuk done. Thanks for PR.

@nickevansuk
Copy link
Contributor Author

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants