Combobox with objects - not simple string items #7049
shurshilov
started this conversation in
Feedback
Replies: 1 comment 3 replies
-
This logic is implemented in Select component, you can view its source code and use it as a reference for your custom component. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to get the combobox to work as a many2one relation selection field. This is a frequent case in my opinion. And the problem is that I can't figure out how to get him to work not just with string like
const MOCKDATA = [
'🍎 Apples',
'🍌 Bananas',
'🥦 Broccoli',
'🥕 Carrots',
'🍫 Chocolate',
'🍇 Grapes',
];
And with complex strings, the selection of which occurs as a result by ID, but the display by NAME
const MOCKDATA = [
{3,'Apples'},
{4,'Bananas'},
{5,'Broccoli'},
{6,'Carrots'},
{7,'Chocolate'},
];
the idea is that eventually the record ID will be in the form. But the user will choose it by its string name
We cannot provide an example?
Beta Was this translation helpful? Give feedback.
All reactions