Closed mlarcher closed 2 years ago
It is expected – Select component does not support custom labels. I'm also not planning to support them in the near future.
I would have thought it to be the case for NativeSelect, but not for Select. Anyhow, thanks for the quick reply. I'll find another way.
I was trying to build a Rating widget through it, is there any more appropriate component to use for such case ?
No, currently we do not provide rating component
Ok.
One last thing : isn't there something fishy in the doc about it ? It states that label
property is of type ReactNode
. It seems to me this should be String
, considering the current behaviour... or am I missing something ?
label
prop controls <label />
element, you can render any react node there
gotcha. Thank you for the explanation.
have the same problem
What package has an issue
@mantine/core
Describe the bug
When using a react node as a label in mantine's Select, dropdown is fine but the value ends up being
[object Object]
once we make a selection. Things go fine with Multiselect for the same use case.In which browser did the problem occur
chrome
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/green-voice-z72yu6
Do you know how to fix the issue
No response
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
No response