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

Checkbox default value #27

Closed
wants to merge 6 commits into from
Closed

Checkbox default value #27

wants to merge 6 commits into from

Conversation

yuriharu
Copy link
Contributor

@yuriharu yuriharu commented Apr 3, 2021

The error was in the init function in tinput fn in core.cljs
It was previously (and default-value (not (READ valpath))) so that whenever checkbox value is false the condition is (not false) = true and updating the DB with default-value.
Changed it to (and default-value (nil? (READ valpath))) so that it only updates to the default value when DB is nil (initialization).
image

Closes #26

@yuriharu yuriharu requested a review from WorldsEndless April 3, 2021 00:16
@yuriharu yuriharu self-assigned this Apr 3, 2021
Copy link
Contributor

@WorldsEndless WorldsEndless left a comment

Choose a reason for hiding this comment

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

Please remove Timber from the deps. This is meant to be a light-weight clojurescript library, and so Timber can exist in the development profile but should not be in the primary deps.

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.

Checkbox 'default-value' should work as expected
2 participants