Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Can ui-select replicate the same select2 "multiple" behavior ? #650

Closed
ubirajaralucena opened this issue Feb 11, 2015 · 6 comments
Closed

Comments

@ubirajaralucena
Copy link

Hi all,

FOA, congratulations for the great work you have donne =)

Could you please help me to configure the right options to achieve the same select2 behavior when using the "multiple" attribute ? [ui-select] removes the selected items from the list while [select2] keep them and adds a "aria-selected=true" attribute to the selected items. As in https://select2.github.io/examples.html (Multiple select boxes).

Thanks again

@uoyknaht
Copy link

+1 for this issue. I also need that selected options would still be visible in options list. Currently this code removes them:

  if (ctrl.multiple){
    //Remove already selected items
    $scope.$watchCollection('$select.selected', function(selectedItems){
      var data = ctrl.parserResult.source($scope);
      if (!selectedItems.length) {
        setItemsFn(data);
      }else{
        if ( data !== undefined ) {
          var filteredItems = data.filter(function(i) {return selectedItems.indexOf(i) < 0;});
          setItemsFn(filteredItems);
        }
      }
      ctrl.sizeSearchInput();
    });
  }

@cobrelli
Copy link

cobrelli commented Apr 9, 2015

+1 for the issue. It would be nice to have this as an option.

@ejbaker
Copy link

ejbaker commented Apr 25, 2016

+1

@user378230
Copy link
Contributor

Related #1567

@user378230
Copy link
Contributor

Closed with #1622 now released

@wellaya
Copy link

wellaya commented Jul 20, 2018

  • better to have select unselect feature same as select2 in multiple select mode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants