bootstrap-select icon indicating copy to clipboard operation
bootstrap-select copied to clipboard

Make one of actionsBox buttons optional

Open superware opened this issue 8 years ago • 0 comments
trafficstars

Hello. Great work on bootstrap-select.

I have a suggestion regarding the actionsBox option. It's often preferred to show a "deselect all" button but NOT the "select all" one, mainly because in search forms when no option is selected it usually means "don't include this field in the search filtering", which should yield the same results as selecting all options.

Except selecting all options (sometimes tens of them) is cumbersome UI and visually wise, and would probably affect server performance with a complex filter condition.

Anyway, my suggestion is very simple to implement, making selectAllText and deselectAllText optional:

'<div class="bs-actionsbox">' +
'<div class="' + (this.options.selectAllText && this.options.deselectAllText ? 'btn-group' : '') + ' btn-group-sm btn-block">' +
(this.options.selectAllText ? '<button type="button" class="actions-btn bs-select-all btn btn-default">' +
this.options.selectAllText +
'</button>' : '') +
(this.options.deselectAllText ? '<button type="button" class="actions-btn bs-deselect-all btn btn-default">' +
this.options.deselectAllText +
'</button>' : '') +
'</div>' +
'</div>'

Thank you in advance!

superware avatar Jan 26 '17 06:01 superware