diff --git a/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx index 09fd0be75..9818c5e81 100644 --- a/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx +++ b/src/frontend/src/pages/SettingsPage/pages/GlobalVariablesPage/index.tsx @@ -1,16 +1,24 @@ import IconComponent from "../../../../components/genericIconComponent"; import { Button } from "../../../../components/ui/button"; +import { ColDef, ColGroupDef, SelectionChangedEvent } from "ag-grid-community"; +import { useState } from "react"; import AddNewVariableButton from "../../../../components/addNewVariableButtonComponent/addNewVariableButton"; import ForwardedIconComponent from "../../../../components/genericIconComponent"; import TableComponent from "../../../../components/tableComponent"; -import { useState } from "react"; -import { ColDef, ColGroupDef } from "ag-grid-community"; +import { cn } from "../../../../utils/utils"; export default function GlobalVariablesPage() { // Column Definitions: Defines the columns to be displayed. const [colDefs, setColDefs] = useState<(ColDef | ColGroupDef)[]>([ - { headerName: "Variable Name", field: "name", flex: 1 }, //This column will be twice as wide as the others + { + headerCheckboxSelection: true, + checkboxSelection: true, + showDisabledCheckboxes: true, + headerName: "Variable Name", + field: "name", + flex: 1, + }, //This column will be twice as wide as the others { field: "type", cellEditor: "agSelectCellEditor", @@ -69,6 +77,8 @@ export default function GlobalVariablesPage() { }, ]); + const [selectedRows, setSelectedRows] = useState([]); + return (
@@ -81,11 +91,18 @@ export default function GlobalVariablesPage() { />

- Manage and assign global variables to default fields. You can add - new global variables by clicking the button. + Manage global variables and assign them to fields.

-
+
+
- + { + setSelectedRows(event.api.getSelectedRows().map((row) => row.name)); + }} + rowSelection="multiple" + suppressRowClickSelection={true} + columnDefs={colDefs} + rowData={rowData} + />
);