Open nfang001 opened 8 years ago
In my html, I define the multiselect as:
<div class="col-sm-6" id="multiSelect"> <div id="itemMultiSelect"><select data-bind="multiselect : { buttonWidth: '100%' }, options: options, optionsValue: 'Id', optionsText: 'Name', value: selectedItem, event: { change: selectedItemChanged}, enable: canEdit"></select></div> ... ... </div>
<div class="col-sm-6" id="multiSelect">
<div id="itemMultiSelect"><select data-bind="multiselect : { buttonWidth: '100%' }, options: options, optionsValue: 'Id', optionsText: 'Name', value: selectedItem, event: { change: selectedItemChanged}, enable: canEdit"></select></div>
...
</div>
In my js file, I am disabling the select using:
$('#multiSelect').multiselect('disable');
In the rendered view, the button width is reset to fit the selected option instead of 100% as set in the html. How can I make sure the button width does not change?
Thanks!
Will try an example, no ad-hoc solution here ...
Is there any update on this issue as I am facing this too and needs a fix for it?
$('id').unbind();
try to remove the events
In my html, I define the multiselect as:
<div class="col-sm-6" id="multiSelect">
<div id="itemMultiSelect"><select data-bind="multiselect : { buttonWidth: '100%' }, options: options, optionsValue: 'Id', optionsText: 'Name', value: selectedItem, event: { change: selectedItemChanged}, enable: canEdit"></select></div>
...
...
</div>
In my js file, I am disabling the select using:
$('#multiSelect').multiselect('disable');
In the rendered view, the button width is reset to fit the selected option instead of 100% as set in the html. How can I make sure the button width does not change?
Thanks!