mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
web: Add placeholder text
This commit is contained in:
@@ -372,7 +372,7 @@ interface DataTableProps {
|
|||||||
|
|
||||||
function computeTableHeight(data: any[]): string {
|
function computeTableHeight(data: any[]): string {
|
||||||
const numRows = data.length;
|
const numRows = data.length;
|
||||||
const height = 70 + Math.min(numRows, 15) * 28;
|
const height = 70 + Math.max(Math.min(numRows, 15), 1) * 28;
|
||||||
return `${height}px`;
|
return `${height}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,6 +425,7 @@ const DataTable = (props: DataTableProps) => {
|
|||||||
columns: columns,
|
columns: columns,
|
||||||
height: height,
|
height: height,
|
||||||
index: "Name",
|
index: "Name",
|
||||||
|
placeholder: "No data",
|
||||||
});
|
});
|
||||||
tableRef.current.on("tableBuilt", () => {
|
tableRef.current.on("tableBuilt", () => {
|
||||||
setTableBuilt(true);
|
setTableBuilt(true);
|
||||||
|
|||||||
@@ -83,3 +83,14 @@
|
|||||||
.tabulator-col-group-cols {
|
.tabulator-col-group-cols {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tabulator-placeholder {
|
||||||
|
width: 100px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tabulator-placeholder * {
|
||||||
|
font-weight: normal !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
color: var(--contrast-60) !important;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user