Open DJWassink opened 10 years ago
I just did a big cleanup of the Select2 integration code and fixed a bunch of bugs. Can you see if you still notice any problems in 0.7.9?
I still want to have an option to disable Select2, but I'd like a more general solution that works for the other 3rd party integrations as well (ace, SCEditor, EpicEditor). Maybe using the JSONEditor.plugins
object somehow. I'd like to think about it some more.
An issue that has now arisen is that the select2 v. 4 syntax is subtly different from the select2 v. 3 syntax, so version detection will need to take place. It'd be good if this PR could be merged so that we could think about this new problem as a separate issue.
Using select2 v4 and the value fails to update for me as well
+1 for adding an option to disable Select2
Or better don't use it by default and add an option to enable it.
+1 Please add the option to disable select2, In my case I have to use select2 for another view above the jsoneditor view. Hence, I have to find the way to disable select2 in the jsoneditor view.
I ran into similar issues since I want to use select2 elsewhere on the page, but found that the JSONEditor select2 support didn't populate enum fields that were provided by setValue
. As a workaround I did this to prevent JSONEditor from using it:
// save a reference to select2
var select2 = window.jQuery.fn.select2;
// clear it from the jQuery functions so JSONEditor doesn't see it
window.jQuery.fn.select2 = null;
// invoke it directly on the jQuery results where I want it enabled
select2.call($('#my-select-list'))
Currently Select2 is completely bugged. Selected item doesn't get set at startup, Neither does the returned json from the editor when you submit the form when another item was set in the Select2 dropdown menu.
Since I am using Select2 for a few other places (menu for example) it would be great if there was a option to disable Select2 for JSON-editor while we can still use Select2 for other things.
227 #225
This fix doesn't seem to work in version 0.7.7? Or maybe it is because I set the value's in the startVal in the schema.
210