0
votes

in ember power select how to include default options for drop-down like "All" in below enter image description here

my service does't return "All" option.I think it not good to include it in the store.

1

1 Answers

1
votes

As you said, it is not good to include additional options to store. Hence, you can just make use of a computed property. Please take a look at the following twiddle. I created a computed property name computedOptions within my-component.js and inserted your custom option "All" as the first option to a new array copied from original options and just passed this computedOptions as options attribute of power-select.