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 Select Component lowercases values #56

Open
Daniel-GraphTx opened this issue Nov 12, 2024 · 3 comments
Open

The Select Component lowercases values #56

Daniel-GraphTx opened this issue Nov 12, 2024 · 3 comments

Comments

@Daniel-GraphTx
Copy link

Very helpful project, thank you.

When using the Select component with FastHTML forms one only gets lowercased values from the Select component. Is there any reason to do SelectItem(item, value=item.lower(), name=item) for item in items in the Select component?

For form use it would be nicer not to lowercase the items.

@curtis-allan
Copy link
Owner

Might be an option, the FT methods are meant to be simple & fast to implement as a boilerplate. Standard method allows for fine-grained control of each element which is why I opted to standardise the value from the name, making them consistent for backend access - but I'll have a think. Thanks for the feedback!

@Daniel-GraphTx
Copy link
Author

Makes sense. In my use case I have users enter data in forms and I show it later, so then I have to re-map to the upper-case value for display. Curious to hear where you end up in your thinking.

@curtis-allan
Copy link
Owner

Makes sense. In my use case I have users enter data in forms and I show it later, so then I have to re-map to the upper-case value for display. Curious to hear where you end up in your thinking.

Ahh I'm following, will add it to the todo list since there's a need :)

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

No branches or pull requests

2 participants