Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

apiCheck warnings when using an object for select options #107

Open
eliagentili opened this issue Nov 27, 2016 · 0 comments
Open

apiCheck warnings when using an object for select options #107

eliagentili opened this issue Nov 27, 2016 · 0 comments

Comments

@eliagentili
Copy link

My server API return an object like this that i need to use for populating my select input:

{
  'iron_man': 'Iron Man',
  'captain_america': 'Captain America',
  'black_widow': 'Black Widow',
  'hulk': 'Hulk',
  'captain_marvel': 'Captain Marvel',
}

i can handle this format with ngOptions, but even if this works, i get a warning in dev tools from apiCheck.

You can see an example here (open your dev tools!):

I can fix that with a pull request simply changing the apiCheck for handling also objects instead of only arrays.

eliagentili added a commit to eliagentili/angular-formly-templates-bootstrap that referenced this issue Nov 27, 2016
You can pass an object with key:value pairs for a select options instead only arrays. You also need

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

No branches or pull requests

1 participant