combobox choiceValue and label #1247
-
I searched in the documentation about it but didn't find any way to have it. I want to have an object HTML code could be like that: <lion-combobox name="my-combobox" label="My Combobox">
<lion-option .choiceValue="${user}" label="${user.name}">${user.name}</lion-option>
</lion-combobox> And when an option is selected, it fill the input with the label instead of the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Maybe it would be possible to write a method: /**
* @overridable
* @param {LionOption} option
* @returns {string}
*/
_getTextboxValueFromOption(option) {
return option.choiceValue;
} And in your extension you would override it and return And wrap all of this code:
Hopefully it's as easy as this. But no guarantees it will come without 'surprises' 🙂 |
Beta Was this translation helpful? Give feedback.
-
I've opened a PR to answer this discussion: #1377 |
Beta Was this translation helpful? Give feedback.
-
It has been solved here: #1377 I will now shamelessly mark this as the right answer, but let me know when not all has been addressed :) |
Beta Was this translation helpful? Give feedback.
It has been solved here: #1377
I will now shamelessly mark this as the right answer, but let me know when not all has been addressed :)