You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason why reactable() currently doesn't fill the RStudio IDE viewer pane (which is the default {htmlwidgets} behavior) is that reactable() passes a default value of "auto" to createWidget()'s height/width
This is because htmlwidgets::createWidget() assumes non-NULL values are user specified values. This isn't very well documented, but you can see evidence of this in http://www.htmlwidgets.org/develop_intro.html as well as the code {htmlwidgets} uses to resolve sizingPolicy():
However, I think I have an idea for removing that "hack", which will allow for non-NULL width.
(P.S., I ran across this because we're currently working on a new fill setting in htmlwidgets::sizingPolicy() that allows widgets to fill a container marked with htmltools::bindFillRole(container = TRUE), which will power "resizable cards" https://rstudio.github.io/bslib/articles/cards.html#responsive-sizing )
The text was updated successfully, but these errors were encountered:
cpsievert
added a commit
to cpsievert/reactable
that referenced
this issue
Nov 1, 2022
The reason why
reactable()
currently doesn't fill the RStudio IDE viewer pane (which is the default{htmlwidgets}
behavior) is thatreactable()
passes a default value of"auto"
tocreateWidget()
'sheight
/width
reactable/R/reactable.R
Lines 220 to 221 in f6a4e0a
reactable/R/reactable.R
Lines 718 to 724 in f6a4e0a
This is because
htmlwidgets::createWidget()
assumes non-NULL
values are user specified values. This isn't very well documented, but you can see evidence of this in http://www.htmlwidgets.org/develop_intro.html as well as the code{htmlwidgets}
uses to resolvesizingPolicy()
:https://github.com/ramnathv/htmlwidgets/blob/cb052ac613ffe13bd6a3f4b6e9333002e72b59d8/R/sizing.R#L193-L194
I've also noticed that we can't simply change
width
/height
's default inreactable
toNULL
, because of this:reactable/R/reactable.R
Lines 710 to 716 in f6a4e0a
However, I think I have an idea for removing that "hack", which will allow for non-
NULL
width.(P.S., I ran across this because we're currently working on a new
fill
setting inhtmlwidgets::sizingPolicy()
that allows widgets to fill a container marked withhtmltools::bindFillRole(container = TRUE)
, which will power "resizable cards" https://rstudio.github.io/bslib/articles/cards.html#responsive-sizing )The text was updated successfully, but these errors were encountered: