question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Radio does not accept null values (similar for checkbox & select)

See original GitHub issue

Describe the bug When using null values in options-prop, the inputs fallback to HTML default behavior as if no value was set.

I would actually expect, that null can be used as value if explicit defined.

Maybe I’m expecting too much here, since null is not a typical value for HTML elements, but from the JS perspective I’d rather expect null than “on”.

Reproduction https://formkit.link/b6a5c9100aff1f93c43b99a50962fefe

Desktop (please complete the following information):

  • OS: Mac 11.6.2
  • Browser: Chrome 98.0.4758.80

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
justin-schroedercommented, Feb 15, 2022

Fair question. Vue is actually the thing making this work the way it does since it sees the null (and undefined) as a no op attribute value.

I dont think it is asking too much however — one of the goals of this project is to smooth out some of those inconsistencies and make things “just work”.

0reactions
justin-schroedercommented, May 12, 2022

@lavolpecheprogramma new issues are generally good for new bugs, but thats one is not a bug — lists must explicitly have array values. An new list will set its own value to an array, but if the list is told to set its value to undefined or null that error will be raised.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Radio buttons vs checkboxes for true/false/null options
My first choice was using two radio buttons which would read "Yes" and "No", but the problem with radio buttons is that they...
Read more >
<input type="checkbox"> - HTML: HyperText Markup Language
A Boolean attribute indicating whether this checkbox is checked by default (when the page loads). It does not indicate whether this checkbox is ......
Read more >
Screen Flow hidden Checkbox does not evaluate to true for ...
When the checkbox component is hidden, its value should be null and we should be able to use its value in the visibility...
Read more >
Add a check box control to show Yes/No values
In Access, a Yes/No field stores only two values: Yes or No. If you use a text box to display a Yes/No field,...
Read more >
Ultimate Guide: Pardot Field Sync Behavior & Null Value Sync
Which platform should be the source of truth? I show you how Pardot Field Sync Behavior and Null Value Sync work between Pardot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found