i made select2 sortable, but need a way to prefill select2 after reload. #24573
andreas83
announced in
Developers Community
Replies: 1 comment
-
found a solution, i put {{ data.controlValue }} in select and use it for refiling. the whole thing took me 5h, wonder if iam the only one who needs a sortable select2 control .... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Start a discussion
This is a code example for sortable select2 with autocomplete.
The only limitation at moment, the select box is empty after reload.
So i need a way to to load the data, any help would be highly appreciated.
Here my Code:
and the corresponding js:
and the rest endpoint:
it works well, until you like to edit existing values.
how to get the existing value in js ? simlar to $this->get_settings_for_display()['my_value']
Beta Was this translation helpful? Give feedback.
All reactions