wearefine/fae

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

jclemans opened this issue · 2 comments

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);

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()

Fixed in #571