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

Preselect simple value items appears, but their labels are missing #1192

Open
noblecraft opened this issue Sep 13, 2015 · 3 comments
Open

Preselect simple value items appears, but their labels are missing #1192

noblecraft opened this issue Sep 13, 2015 · 3 comments

Comments

@noblecraft
Copy link

Currently uiSelectMultipleDirective, which is used if multiple is set, either uses the ngModel array (simple values), or the $parsed 'data' array for ngModel parsing / formatting (to/from view).

This means the 'data' array needs to be populated.

This is a problem if I have pre-existing (simple) values selected for ngModel. I don't want to populate the entire data array (e.g. if my data array is huge). I can't just populate the data array with the corresponding complex values, since I don't want the user to be able to select duplicates.

I think we need to add an attribute e.g. <ui-select dict='someDictionaryPromise'>, and add another conditional branch to lookup / parse value by dict?

@noblecraft
Copy link
Author

created a PR: #1193

this is not production ready code, feedback sought about the idea.

thanks

@noblecraft
Copy link
Author

This might be a duplicate of #404

I think comment @sporkd https://github.com/sporkd hit nail on its head there.

@noblecraft noblecraft changed the title resolving simple values in uiSelectMultipleDirective.js Preselect simple value items appears, but their labels are missing Sep 17, 2015
@cmichal
Copy link

cmichal commented Oct 23, 2015

+1

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

3 participants