mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
web: DataTable: Use list editor for boolean values
This commit is contained in:
@@ -32,7 +32,6 @@ export const generateTableColumns = (
|
|||||||
const subColumns: ColumnDefinition[] = [];
|
const subColumns: ColumnDefinition[] = [];
|
||||||
switch (spec.type) {
|
switch (spec.type) {
|
||||||
case "string":
|
case "string":
|
||||||
case "boolean":
|
|
||||||
case "busRef":
|
case "busRef":
|
||||||
columns.push({
|
columns.push({
|
||||||
...columnsCommonAttrs,
|
...columnsCommonAttrs,
|
||||||
@@ -41,6 +40,18 @@ export const generateTableColumns = (
|
|||||||
minWidth: spec.width,
|
minWidth: spec.width,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "boolean":
|
||||||
|
columns.push({
|
||||||
|
...columnsCommonAttrs,
|
||||||
|
title: spec.title,
|
||||||
|
field: spec.title,
|
||||||
|
minWidth: spec.width,
|
||||||
|
editor: "list",
|
||||||
|
editorParams: {
|
||||||
|
values: [true, false],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
break;
|
||||||
case "number":
|
case "number":
|
||||||
columns.push({
|
columns.push({
|
||||||
...columnsCommonAttrs,
|
...columnsCommonAttrs,
|
||||||
|
|||||||
Reference in New Issue
Block a user