Select2 disable not working...
Select2 disable not working...
kaustubh.agrawal2000
Posts: 88Questions: 39Answers: 2
in Editor
I am using select2 plugin, although it works well, I have a use case where i should disable option select during edits.
which I am doing like:
editor.on( 'initEdit', function ( e, json, data ) {
editor.disable('commodity_id');
editor.disable('transaction_type');
});
Here, commodity_id & transaction_type are both select2 fields.. values of which are populated by AJAX.
The fields on the form are shown as GREYED OUT (like disabled).. but I am still able to select the options...
How can I disable that ?
Steps to reproduce
GOTO: https://gadhiya.in
Login
- UNAME: sunil.gadhiya@gmail.com
- PWD : 12345678
Clear browser cache
GOTO: https://gadhiya.in/parameter
TRY Editing any of the rows..
The commodity field is disabled but still the select options are shown and selectable.
Regards
Kaustubh
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You have this in
common.js
which is causing the list to open:Allan
Thanks a lot Allan..
You are awesome...
BTW, can you please let me know, what tools do you use to debug JS ?
I find it particularly difficult to track JS events....