Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The label and value are the same when using nativeEnum #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JIASENG126
Copy link

To begin, I want to express my gratitude for the chance to propose enhancements to this project!

Description:

I've observed that when utilizing nativeEnum, the values for label and value coincide. Furthermore, I believe it would be advantageous if radio-group could also accommodate the label and value format.

Changes Made:

  • Adjusted the transmission of values for label and value within the enum.
  • Enhanced radio-group to support the label and value format similarly when using nativeEnum.

@andrewdoro
Copy link

andrewdoro commented May 1, 2024

Wouldn't this change break the default zod enum?

@vantezzen
Copy link
Owner

Yes I feel like this would break the zod validation as the zod enum uses the value only?

Keep in mind that zod will validate and return the enum labels, not the enum values!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants