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

ui-select multiple - Show all options in drop down including selected one's #1596

Closed
durga-telsiz opened this issue May 9, 2016 · 3 comments
Labels

Comments

@durga-telsiz
Copy link

Currently the Selected items are removed from the drop down. How to show all options?

To differentiate selected one's from others, I want to either disable the selected options in drop down. Or handle with check boxes. This is mainly for huge lists, so user can always see all options available in the options. Is there a way to do this?

@user378230
Copy link
Contributor

You may find #1567 helpful (not currently ready to be merged though)

@Kjir
Copy link

Kjir commented Sep 22, 2016

In the meantime, #1567 has been merged and I was almost successful in creating a dropdown with checkboxes.

Alas one problem remains: no matter what, the rows in the dropdown have the ng-click="$select.select(...)" set, even for disabled rows. This means that I have a very hard time putting the correct ng-click action on the item.

Also, the interface becomes a little funky in this scenario (notice the ng-click):

      <div id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}"
        class="ui-select-choices-row">
        <div ng-click="$select.isDisabled(this) && $selectMultiple.removeChoice($select.selected.indexOf(this[$select.itemProperty])) && $event.stopPropagation()">
          <span class="checkbox">
            <input type="checkbox" ng-checked="$select.isDisabled(this)"/>
          </span>
          <span class="ui-select-choices-row-inner"></span>
        </div>
      </div>

I haven't figured out a way to make it behave properly, yet, but a better interface would be needed to make it easier.

If I figure out a good way to solve this problem I will submit a PR

@user378230
Copy link
Contributor

user378230 commented Sep 28, 2016

Closing this as #1567 has been merged. The additional comment is covered by #1651

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

No branches or pull requests

3 participants