Allow strings as values for Tabs active prop #1661
mcmxcdev
started this conversation in
Feature requests
Replies: 2 comments 1 reply
-
This is already implemented in https://v5.mantine.dev/changelog/5-0-0/ |
Beta Was this translation helpful? Give feedback.
1 reply
-
@rtivital Unfortunately, I have further requests for this issue: Although we can now use I can also imagine that in other cases, numbers would indeed be useful as well. Can you consider changing |
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
-
I need to have buttons that look like this: https://mantine.dev/core/tabs/#add-your-styles-with-styles-api which act as replacement for standard radio buttons in our case, since the designers don't like the look of default radio buttons and I couldn't find a
UnstyledRadio
component.Chakra-UI has a
useRadio
hook, see: https://chakra-ui.com/docs/components/radio/usage#custom-radio-buttonsI am using https://mantine.dev/core/tabs/#controlled-tabs but discovered that the
active
prop only accepts numeric values andonChange
gives back the tab index rather than the value that is passed into.It would be great to be able to work with string values, e.g.
male/female/other
rather than having them represented as0/1/2
. This is how I would imagine it to simulate radio button behavior:Beta Was this translation helpful? Give feedback.
All reactions