-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
feat(form): allow to ignore init of existing fui modules inside form #2793
Conversation
I would prefer Also, to fix #2791 fully, is it possible to emit a console error when a module is initialize more then once? (as as discovered in the issue, 2nd init setting is ignored and it implies a broken usage). |
This PR is obsolete as the main issue was fixed by #2794 |
I implemented that in the latest commit, however, as i recognized the basic issue was caused by dropdown rather than form, i dont think we should have the need to implement that setting anymore
This would be needed inside every module and in some cases this possibly isnt an error (re-instantiating is possible by design). let $element = $('.ui.dropdown');
iWasInstantiatedBefore = $element.data('module-dropdown');
if (!iWasInstantiatedBefore) {
$element.dropdown();
} |
Thank you. If re-instantiating is by design and working properly, I agree this PR is not needed anymore. |
@lubber-de Do I have to approve this PR? I've understood that you've said we're not gonna need this implementation here and here. |
No, i'll close this without merging and removed the "awaiting-review" tag |
Description
In case one wants to handle dropdown or calendar init after form init, this PR adds an optional
ignoreModulesOnInit
setting to support that.Testcase
Selecting any value inside the dropdown must be clearable
https://jsfiddle.net/lubber/3pLrgvsa/1/
Closes
#2791