destroying then re-applying chosen for some reason auto-selects all options. Fix the problem by fixing the table width with css so that the underlying select is already 100%.
parent
6f8f47831f
commit
ade3a01902
|
@ -4,8 +4,7 @@ function newGroup() {
|
|||
.done(function(data) {
|
||||
insertModalHtml('groupdModal', data.html);
|
||||
$j('#groupModal').modal('show');
|
||||
$j('.chosen').chosen("destroy");
|
||||
$j('.chosen').chosen();
|
||||
$j('#newGroupMonitorIds').chosen({width: "100%"});
|
||||
})
|
||||
.fail(logAjaxFail);
|
||||
}
|
||||
|
@ -17,7 +16,7 @@ function setGroup( element ) {
|
|||
}
|
||||
|
||||
function editGroup( element ) {
|
||||
var gid = element.getAttribute('data-group-id');
|
||||
const gid = element.getAttribute('data-group-id');
|
||||
if ( !gid ) {
|
||||
console.log('No group id found in editGroup');
|
||||
} else {
|
||||
|
@ -25,8 +24,7 @@ function editGroup( element ) {
|
|||
.done(function(data) {
|
||||
insertModalHtml('groupModal', data.html);
|
||||
$j('#groupModal').modal('show');
|
||||
$j('.chosen').chosen("destroy");
|
||||
$j('.chosen').chosen();
|
||||
$j('#newGroupMonitorIds').chosen({width: "100%"});
|
||||
})
|
||||
.fail(logAjaxFail);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue