-
Notifications
You must be signed in to change notification settings - Fork 80
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
Bug fix: show = FALSE as default #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, thanks! I added some minor suggestions to bump to a dev version, and to add proper credit in NEWS.
I'd also like to handle the case where there's a default show = FALSE
value, and a colDef()
is provided without show
. With the current changes, the default value is always overridden if colDef()
has been provided. For example, the Sepal.Width
column will be visible here:
reactable(
iris,
defaultColDef = colDef(show = FALSE),
columns = list(
Species = colDef(show = TRUE),
Sepal.Width = colDef(name = "sepal width") # Has show = TRUE by default
)
)
I think a simple way to handle this would be to change the default value of show
to NULL
in colDef()
.
Co-authored-by: Greg Lin <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
- Coverage 99.17% 99.02% -0.16%
==========================================
Files 15 9 -6
Lines 1823 1125 -698
Branches 335 335
==========================================
- Hits 1808 1114 -694
+ Misses 15 11 -4
Continue to review full report at Codecov.
|
Co-authored-by: Greg Lin <[email protected]>
Co-authored-by: Greg Lin <[email protected]>
I've updated the default to NULL and tweaked the docs to match previous entries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
In the current version, this
doesn't work.
My PR changes the line:
This meant that setting
show = TRUE
was treated as a NULL and stripped out. I simply changed that line toto match the above style. The following examples work as expected: