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

"Deselect all" link gets duplicated on multi-select fields after a nested form update #551

Closed
jclemans opened this issue Aug 26, 2021 · 2 comments

Comments

@jclemans
Copy link
Contributor

Normally, a single "Deselect all" link is added below each multiselect field to allow quick and easy clearing on multiple items. however, this link gets duplicated multiple times below each field when a nested table is updated on the same form view.

It looks like Fae.form.select.init(); is called after a nested form update which in turn calls multiselectOrChosen which is where the deselect button is added to chosen via $deselect_all_action.insertAfter($chosen);

@jclemans
Copy link
Contributor Author

jclemans commented Sep 1, 2021

A temporary fix to remove the duplicate deselect links is to add a function that does something like this into your fae.js:
$('.select').find('.multiselect-action_wrap:not(:first)').remove()

@jamesmk
Copy link
Member

jamesmk commented Mar 29, 2023

Fixed in #571

@jamesmk jamesmk closed this as completed Mar 29, 2023
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