-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue when used with multiple fields
When there are multiple fields of this field type, the AJAX is picking the last field’s attributes to process the data for all the fields. You would never see the issue if all the fields are set to use the same content types but you would see the problem only when different content types are set to each field. Always the last field’s content items are populated to all select fields in the page. It is because the for loop (which run through all selects in the page) finishes prior to the end of first AJAX call so the last select field is used in every AJAX call. The fix is not to set the options array passed to select2() before AJAX and set it dynamically everytime the select2 is called.
- Loading branch information
1 parent
d05cf67
commit 4e47187
Showing
1 changed file
with
66 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters