Skip to content

Commit

Permalink
WIP - Table Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
handstandsam committed Nov 30, 2024
1 parent b4a5d4c commit 73f3342
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions invert-report/src/jsMain/kotlin/ui/BootstrapComposables.kt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@ fun BootstrapTableRow(
}) {
cellValues.forEachIndexed { idx, cellValue ->
Td({
style {
// property("max-width", "350px")

// property("word-wrap", "break-word")
// property("white-space", "normal")
// property("white-space", "nowrap")
if (!cellValue.startsWith("```")) {
property("word-break", "break-all") // Don't allow wrapping for code references
}
// property("overflow", "hidden")
}
// max-width: 150px; /* Set a maximum width for the cells */
if (idx == 0) {
onClicked?.let {
onClick { onClicked(idx) }
Expand Down Expand Up @@ -235,6 +247,19 @@ fun BootstrapTable(
var maxNumberOfRows by remember { mutableStateOf(maxResultsLimitConstant) }
Table({
classes("table table-bordered table-striped table-hover table-sm".split(" "))
style {
property("font-size", "0.6rem")
// : ;
// -overflow: ellipsis;
// white-space: nowrap; /* Prevents wrapping */
// max-width: 150px; /* Set a maximum width for the cells */
// : ; /* Adjust to make text smaller */
// property("transform", "scale(0.7)")
// property("transform-origin", "top left")
// property("width", "100%")
// transform: scale(0.9); /* Adjust the scale factor as needed */
// transform-origin: top left; /* Keeps the table aligned to its original position */
}
}) {
var sortIdx by remember { mutableStateOf(sortByColumn) }
var ascending by remember { mutableStateOf(sortAscending) }
Expand Down

0 comments on commit 73f3342

Please sign in to comment.