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

feat(choices): use object as source iterating over its properties #1208

Merged
merged 2 commits into from
Sep 29, 2015

Conversation

dimirc
Copy link
Contributor

@dimirc dimirc commented Sep 27, 2015

We'll be able to use an object as the source for the choices (iterating over its properties)

Demo plunker

Pending:

  • Need to add a watch to update choices when source object changes

@dimirc dimirc force-pushed the feat-object-as-source branch from d2ce54c to 87e732e Compare September 28, 2015 02:21
dimirc added a commit that referenced this pull request Sep 29, 2015
feat(choices): use object as source iterating over its properties
@dimirc dimirc merged commit a14e81d into master Sep 29, 2015
@dimirc dimirc deleted the feat-object-as-source branch September 29, 2015 17:17
@amcdnl
Copy link
Contributor

amcdnl commented Oct 9, 2015

@amcdnl
Copy link
Contributor

amcdnl commented Oct 9, 2015

@dimirc It also does not work with 'nested' objects. The following setup:

    <ui-select ng-model="actionCtrl.model.action.delimeterType" style="width:100%">
        <ui-select-match>{{$select.selected}}</ui-select-match>
        <ui-select-choices repeat="type as (type, name) in actionCtrl.delimiterTypes | filter: $select.search">
          <div ng-bind-html="name | highlight: $select.search"></div>
        </ui-select-choices>
    </ui-select>

tries to bind all the properties of actionCtrl. http://www.screencast.com/t/jMN4BZiI ...you can see here where the parser expression is wrong: http://www.screencast.com/t/iX7HgSdAMqDE ( sorry thats a diff select but you get the idea )

amcdnl added a commit that referenced this pull request Oct 9, 2015
amcdnl added a commit that referenced this pull request Oct 9, 2015
Fixes #1208 matching and hardcoded value
@amcdnl
Copy link
Contributor

amcdnl commented Oct 9, 2015

@pdegenhardt @dimirc I have resolved the issues and release 0.13.2

@Avien
Copy link

Avien commented Oct 21, 2015

Can you please check out issue #1255 I opened yesterday?
I have the exact same problem you described and upgraded to v0.13.2 but still not working
Maybe there is still a problem when using nested objects in a multiple select?
Thanks

@samuel-weber
Copy link

Hi amcdnl
Your Change #1208 broke the track by expression
Example: n in [42, 42, 43, 43] track by $index

#1208

Greets Samuel

@ChristianKohler ChristianKohler mentioned this pull request Oct 22, 2015
pgrm pushed a commit to grmanit/ui-select that referenced this pull request Nov 3, 2015
abruere pushed a commit to abruere/ui-select that referenced this pull request Dec 30, 2015
pgrm pushed a commit to grmanit/ui-select that referenced this pull request Feb 7, 2016
MDziwny pushed a commit to jurismarches/ui-select that referenced this pull request Mar 18, 2016
…dered by groups

The dropdown was going back to the activated element ('A' for instance) when the user clicked on the 'X' element, which was quite annoying when he wanted to select also Y and Z
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants