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

redraw() is needed if external js disables options after the multi initialization #32

Open
2x2p opened this issue May 6, 2019 · 2 comments

Comments

@2x2p
Copy link

2x2p commented May 6, 2019

If JavaScript has disabled for example Blueberry after the multi has already been Initialized. Blueberry will not be shown as a disabled option until the user clicks e.g. Coconut. The other JavaScript should be able to ask for a redraw of the entire element.

Or how can I trigger a change() after initialization?

@2x2p 2x2p changed the title redraw() is needed if js disables/enables options after initialization redraw() is needed if external js disables options after the multi initialization May 6, 2019
@2x2p
Copy link
Author

2x2p commented May 7, 2019

I do understand triggering a change can be done through JQuery after reading issue #15. But can it be done when JQuery is not present? For example when multi is also listening for element.focus() or element.blur()?

I am asking because if the select tag has the onChange set in its HTML any function called onChange is again calling for a refresh as suggested in #15 $( element ).trigger( 'change' ); this will cause an infinite loop.

@fabianlindfors
Copy link
Owner

I'm sorry about the very late reply! Do you still need help with this issue? If so, could you explain a bit further what you're trying to achieve?

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

No branches or pull requests

2 participants