Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one-way-select rendering includeBlank as string #152

Open
jamesdixon opened this issue Mar 31, 2017 · 1 comment
Open

one-way-select rendering includeBlank as string #152

jamesdixon opened this issue Mar 31, 2017 · 1 comment

Comments

@jamesdixon
Copy link

Hi,

With 2.0.0, one-way-select is rendering includeBlank=true as the literal string, true rather than just a blank option.

Here's a twiddle reproducing the issue: https://ember-twiddle.com/58e68f49e02a2e0d8daf748daf41e315?openFiles=twiddle.json%2C

Thanks!

@czosel
Copy link

czosel commented Jun 13, 2017

There are two properties related to this: includeBlank and prompt. Currently prompt is just an alias of includeBlank, which means you can just pass the string you want to display to either of them instead of passing true.

I agree that the current situation is not ideal. The docs are currently also not clear about what happens when both options are specified - currently the parameter that is passed last wins, which I found quite surprising. includeBlank should probably just take a boolean, and prompt a string. If both are specified, includeBlank=false should hide the blank option.

If the maintainers agree, I'd be happy to provide a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants