in ember power select how to include default options for drop-down like "All" in below
my service does't return "All" option.I think it not good to include it in the store.
in ember power select how to include default options for drop-down like "All" in below
my service does't return "All" option.I think it not good to include it in the store.
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
.