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

Toggle buttons does not reflect active value when selecting an option with null or undefined as its value. #1076

Closed
skuhnow opened this issue Dec 13, 2023 · 3 comments
Assignees
Labels
🐛 bug Verified bug by team 🟡 priority-2 2. Medium priority issue Pro Pertains to FormKit Pro

Comments

@skuhnow
Copy link

skuhnow commented Dec 13, 2023

Reproduction

https://formkit.link/952d7fefdb3149381a7c703e1d90793f

Describe the bug

If you create an option like { label: 'Unklar', value: undefined, icon: 'schedule' }, or { label: 'Unklar', value: null, icon: 'schedule' }, the value is always __mask_1.
I expect the value to be null or undefined

Environment

• OS: Linux Mint 20.3
• Browser: Firefox 120.01

@skuhnow skuhnow added ⛑ Needs triage The issue has not yet been examined by the FormKit team. 🐛 bug-report Bug is reported, but not verified by team labels Dec 13, 2023
@sashamilenkovic sashamilenkovic added 🐛 bug Verified bug by team Pro Pertains to FormKit Pro and removed 🐛 bug-report Bug is reported, but not verified by team ⛑ Needs triage The issue has not yet been examined by the FormKit team. labels Dec 13, 2023
@sashamilenkovic sashamilenkovic added the 🟡 priority-2 2. Medium priority issue label Dec 14, 2023
@sashamilenkovic
Copy link
Contributor

@skuhnow This has been resolved at @formkit/pro 0.119.2 (latest tag).

@maartenvanhunsel
Copy link

@sashamilenkovic looks like the active state is not working when the value is null or undefined

@sashamilenkovic sashamilenkovic changed the title Togglebuttons returns __mask_1 value if option value is null or undefined Toggle buttons does not reflect active value when selecting an option with null or undefined as its value. Dec 18, 2023
@sashamilenkovic
Copy link
Contributor

@maartenvanhunsel @skuhnow undefined is not meant to be used as a value of a FormKit option. However, the active state should now be reflected when selecting an option the value of null on version 0.119.5 of FormKit Pro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Verified bug by team 🟡 priority-2 2. Medium priority issue Pro Pertains to FormKit Pro
Projects
None yet
Development

No branches or pull requests

4 participants