Closed rick643charts closed 2 years ago
Hi @rick643charts, this is because dmc.SegmentedControl expects value
to be string. The reason you are not getting any type error is because dash does prop check only in debug mode. So if you develop apps with debug=True
, you will see the error that value
should be string.
Thanks for the reply @snehilvj. I suppose this is part of a larger discussion / feature request, as I've been restructuring some existing applications to leverage dash_mantine_components
in place of dash_bootstrap_components
and some core Dash components. Do you currently have plans to accommodate label-value object arrays that allow non-string-type values similar to the core Dash components? For example, it's often the case that Select component options (data prop) are populated directly from our relational database that relies heavily on integer-type object IDs.
Thus far my experience with the library has been great, you've done an incredible job accommodating numerous UI/UX use cases that were not adequately met by the existing libraries out there!
This change is somewhat dependent on the React library beneath dmc. I'll raise it in the Mantine's discord channel to see if Mantine will support this.
It appears that the SegmentedControl component is treating a value of 0 as falsey. For example:
Yields the following:
https://user-images.githubusercontent.com/76791595/157121104-ed451e81-9d65-4711-b73c-ef3f276aa7ba.mp4