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

Add emptyOptionValue configuration option #661

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

Conversation

malon43
Copy link

@malon43 malon43 commented Nov 21, 2023

This change allows for an empty option that does not necessarily have a value="", but any specified string.

@oyejorge
Copy link
Member

oyejorge commented Nov 21, 2023 via email

@malon43
Copy link
Author

malon43 commented Nov 22, 2023

Sorry for not being clear. Yes, the problem is that the values are always handled normally, even when the desired "Empty option" would have a different value from "".

E.g. QuerySelectField from wtforms - SQLalchemy when passing allow_blank=True, will add an empty option, with value="__None", and right now there is no way to directly handle this in tom-select if the desired outcome is not showing the empty option and sending "__None" in the case the user does not pick anything.

@malon43
Copy link
Author

malon43 commented Feb 27, 2024

@oyejorge are there any plans of having this request merged?

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

2 participants