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

FIX: boolean field default state mismatch #353

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

Conversation

renato
Copy link
Contributor

@renato renato commented Feb 3, 2025

When reading an existing state from the params defaults or from URL params, the input elements weren't representing the right state for booleans and "3-state/null booleans".

internal /t/-/118495

@@ -194,10 +194,10 @@ export default class ParamInputForm extends Component {
case "category_id":
return digitalizeCategoryId(value);
case "boolean":
if (value == null) {
if (value == null || value === "#null") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default #null wasn't working either

Copy link
Contributor

@martin-brennan martin-brennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for fixing this Renato!

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

Successfully merging this pull request may close these issues.

2 participants