-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dataTableOutput()'s width and height now default to NULL (#1026)
- Loading branch information
Showing
5 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
dataTableOutput() no longer supplies a default size via inline styles, so define those defaults here. | ||
We also define `flex-basis` since when dataTableOutput() (and thus htmlwidgets::shinyWidgetOutput()) has height = NULL, it receives a CSS class which effectively amounts to `flex: 1 1 auto` in a `{bslib}` app (to make it so widgets can stretch vertically inside of resizable card()s). That's mostly fine, but `fillContainer=TRUE`+`height:auto`+`flex-basis:auto` is problematic for DT since the table wants to fit the parent but the parent wants to fit the table. Thankfully, setting `flex-basis` to a fixed size seems to resolve that issue. | ||
*/ | ||
|
||
.datatables.html-widget { | ||
width: 100%; | ||
height: auto; | ||
flex-basis: 400px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.