searchable-option-list icon indicating copy to clipboard operation
searchable-option-list copied to clipboard

"Select all" but only for filtered items

Open eskimoblood opened this issue 9 years ago • 2 comments

Is there a way to select all items that are matching the filter. And if not, how hard do you think is it to implement this feature.

eskimoblood avatar Feb 01 '16 10:02 eskimoblood

Right now it is not possible but to implement this feature should be rather simple. I will put that on my TODO list

pbauerochse avatar Feb 03 '16 08:02 pbauerochse

I made it with this, go to line 997 of sol.js (more or less) and this is what I got.

    selectAll: function () {
        if (this.config.multiple) {
            var $changedInputs = this.$selectionContainer
                .find('input[type="checkbox"]:not([disabled], :checked):visible')
                .prop('checked', true)
                .trigger('change', true);

            this.close();

            if ($.isFunction(this.config.events.onChange)) {
                this.config.events.onChange.call(this, this, $changedInputs);
            }
        }
    },

lalogalindo avatar Jul 01 '16 23:07 lalogalindo