Skip to content
New issue

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

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

Already on GitHub? # to your account

[v1] QSelect - options-value is being ignored #3672

Closed
TobyMosque opened this issue Mar 25, 2019 · 4 comments
Closed

[v1] QSelect - options-value is being ignored #3672

TobyMosque opened this issue Mar 25, 2019 · 4 comments

Comments

@TobyMosque
Copy link
Contributor

TobyMosque commented Mar 25, 2019

Software version

Quasar: 1.0.0-beta.13
@quasar/app (v1+ only):
OS:
Node:
NPM:
Browsers: Opera
iOS:
Android:
Any other software related to your bug:

JsFiddle

https://codepen.io/tobias-mesquita/pen/jJJZYM?&editable=true&editors=101

What did you get as the error?

option-value property is being ignored when options is a array of objects.
in the codepen, u'll notice than single and multiple is a object instead of a integer.

What were you expecting?

value property respect the option-value.
in the codepen, single would be a integer and multiple a array of integers.

What steps did you take, to get the error?

open the codepen and watch single and multiple fields.

@pdanpdan
Copy link
Collaborator

It's option-value and option-label - singular.

@TobyMosque
Copy link
Contributor Author

TobyMosque commented Mar 25, 2019

@pdanpdan thx, i corrected the typo, but since label and value are the default values of option-label and option-value, so that wouldn't affect the sample.

but while correcting the typo, i noticied another thing, if the option-value is a function, that would check if the selected option isn't null, if not, that will break when q-select didn't have a selected value.

probably we would prevent that method to be called when the q-select didn't have a selected value.

@pdanpdan
Copy link
Collaborator

Then you got it wrong. What you want is emit-value and map-options - then you can specify option-value. If you have no emit-value then the whole object is emitted.

@TobyMosque
Copy link
Contributor Author

@pdanpdan i noticied that too.

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

No branches or pull requests

2 participants