selectr icon indicating copy to clipboard operation
selectr copied to clipboard

From 'DeselectOption' to Select All Option

Open borjakhet opened this issue 7 years ago • 0 comments

      Selectr.DeselectOption = function(opt) {
        var currentSelectionCount, el;
        el = $(opt).parents('.selectr').prev();
        $(opt).parents('.selectr').removeClass('max-selection-reached');
        $(opt).removeClass('selected');
        $("option[value=" + ($(opt).data('val')) + "]", el).prop('selected', false);
        currentSelectionCount = $('option:selected', el).length;
        $('.current-selection', $(opt).parents('.selectr')).text(currentSelectionCount > 0 ? currentSelectionCount : '');
        return this.TriggerChange(el);
      };

This funcions deselect all the options.

How would like to change this functionality to select all options . Can someone give me a hand?

Thanks

borjakhet avatar May 02 '17 13:05 borjakhet