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

94639 deselect bug fix #571

Merged
merged 4 commits into from
Mar 4, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions app/assets/javascripts/fae/form/inputs/_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@ Fae.form.select = {
})
});

// Add actions to wraper
$deselect_all_action.insertAfter($chosen);
// prevent multiple deselect all actions from being added when nested forms are generated
if ($('.multiselect-action_wrap').length === 0) {
// Add actions to wraper
$deselect_all_action.insertAfter($chosen);
}

// Add special "Select All" option and notify Chosen of new option
addSelectAllOption($element)
// prevent multiple 'SELECT ALL' options from being added when nested forms are generated
if ($element[0].options[0].value != select_all_value) {
// Add special "Select All" option and notify Chosen of new option
addSelectAllOption($element)
jaybones90 marked this conversation as resolved.
Show resolved Hide resolved
}

// Mark label wrapper as having multiselect actions for styling
$label.addClass('has-multiselect-actions');
Expand Down