Tuesday, December 20, 2016

Boostarp Multiselect - Part 4

Methods 

In this post I'm going to explain about some methods we can use with the Boostrap multiselect plugin. 

Destroy 

This method is used to unbind the plugin on the given element.















Refresh 

This method is used to refresh the checked checkboxes based on the currently selected options within the select.















Select

This method  Selects the given options in the select list. 








Select all the visible options 

This method  Selects all options. If justVisible is set to true or not provided , all visible options are selected (when using filter) , otherwise  all options are selected. 






Deselect

This method  deselects an option by its value.
















Deselect all visible options 

This method  deselects  deselects all options. If justVisible is set to true or not provided, all visible options are deselected. Otherwise all options are deselected. 








Update Button text 

 When manually selecting / deselecting options and the corresponding checkboxes , this function updates the text and the titile of the button. 

Usually this method is only needed when using
 .multiselect('selectAll', justVisible) or .multiselect('deselectAll', justVisible).
 In all other cases, .multiselect('refresh') should be used.

Data Provider

This method is used to provide options to the select list programmatically. 





No comments:

Post a Comment