Overwrite toSelectOption
with manually defining the label and/or value fields
#7
jhhazelaar
started this conversation in
Ideas
Replies: 1 comment
-
I'm not completely following along, how would toSelectOption work in this case? And how would you construct an options object using it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank you for creating this packages!
We are using it with different models and all implemented the
Selectable
withtoSelectOption
. This works fine with all the models, but we have a country model with name, iso2 and phone_code als fields. For a country select with thetoSelectOption
option like below works great:When creating a country code select with the phone code becomes a problem, because we wan't to overrule the
toSelectOption
in a template like this:Is it an idea to pass the value and label property to
toSelectOption
as arguments so you can use them in detoSelectOption
value?Hopefully my explanation is any good :-)
Beta Was this translation helpful? Give feedback.
All reactions