one-way-select not accepting SafeString as its `prompt` param
bardzusny opened this issue · comments
One-way-select doesn't display SafeString
instances passed as its prompt
parameter values - due to primitive typeof
check in promptText
computed property: https://github.com/DockYard/ember-one-way-controls/blob/master/addon/components/one-way-select.js#L126 .
Common use-case for this is using translated strings (ember-i18n
):
Current workaround is to override aforementioned promptText
computed property by hand:
Twiddle with reproduced issue (and current workaround): https://ember-twiddle.com/00fee438383f6db62c717c03d2bbb5dd?openFiles=templates.application.hbs%2C .
Will be happy to submit PR with fix - my first thought is to remove promptText
computed altogether, or just make it coerce prompt
into String
(making it kind of redundant?). Any other suggestions?
I am not quite sure why we have a separate CP for this, maybe @martndemus remembers?