-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ANT-706] New design for listings clusters (Thermal / Renewables) #1513
Comments
[{ id: "sct11", name: "SCT 1.1", group: "Noeud 1", columns: { status: "actif", injection: 350, ...} },
{ id: "sct12", name: "SCT 1.2", group: "Noeud 1", columns: { status: "inactif", injection: 300, ...},
{ id: "sct12", name: "SCT 1.2", group: "Noeud 1", columns: { status: "actif", role: "admin", injection: 300, ...}
}]
[{ name: "status", label: "Statut", chip: { actif: "success", "inactif": "primary" }},
{ name: "role", label: "Role", chip: { admin: "success" },
{ name: "injection", label: "Injection nominale capacity", groupOperation: "sum" }] |
This was referenced Jun 30, 2023
Following Material React Table's documentation here's example Basic STStorage example type Storage = {
id: string;
group: string;
name: string;
injectionNominalCapacity: number;
withdrawalNominalCapacity: number;
reservoirCapacity: number;
efficiency: number;
};
const data: Storage[] = [
{
id: "short-term-storage-of-area-west",
group: "",
name: "Short-Term Storage of Area West",
injectionNominalCapacity: 5000.0,
withdrawalNominalCapacity: 4500.0,
reservoirCapacity: 61000.0,
efficiency: 0.0,
},
{
id: "short-term-storage-of-area-east",
group: "",
name: "Short-Term Storage of Area East",
injectionNominalCapacity: 1500.0,
withdrawalNominalCapacity: 1500.0,
reservoirCapacity: 20000.0,
efficiency: 0.94,
},
{
id: "storage1",
group: "Battery",
name: "Storage1",
injectionNominalCapacity: 1500.0,
withdrawalNominalCapacity: 1500.0,
reservoirCapacity: 20000.0,
efficiency: 0.94,
},
{
id: "psp1",
group: "PSP_closed",
name: "PSP_closed_1",
injectionNominalCapacity: 3500.0,
withdrawalNominalCapacity: 3000.0,
reservoirCapacity: 41000.0,
efficiency: 0.75,
},
{
id: "storage2",
group: "PSP_closed",
name: "Storage2",
injectionNominalCapacity: 2000.0,
withdrawalNominalCapacity: 1500.0,
reservoirCapacity: 20000.0,
efficiency: 0.78,
},
{
id: "storage3",
group: "PSP_closed",
name: "Storage3",
injectionNominalCapacity: 1500.0,
withdrawalNominalCapacity: 1500.0,
reservoirCapacity: 21000.0,
efficiency: 0.72,
},
];
const columns = useMemo<MRT_ColumnDef<Storage>[]>(
() => [
{
accessorKey: "group",
header: "Group",
size: 150,
},
{
accessorKey: "name",
header: "Name",
size: 200,
},
{
accessorKey: "injectionNominalCapacity",
header: "Injection Nominal Capacity",
size: 200,
},
{
accessorKey: "withdrawalNominalCapacity",
header: "Withdrawal Nominal Capacity",
size: 220,
},
{
accessorKey: "reservoirCapacity",
header: "Reservoir Capacity",
size: 180,
},
{
accessorKey: "efficiency",
header: "Efficiency",
size: 150,
},
],
[]
);
const groups = ["Battery", "PSP_closed"]; Import the component and use: <GroupedDataTable
data={data}
columns={columns}
groups={groups}
onSubmit={handleSubmit}
onDelete={handleDelete}
/> |
Two issues refers to this one still open. |
we still need to refactor and use the new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update the cluster view with this new design:
More informations of clusters will be available directly on root page.
Comparison feature will be added later in DynamicDataTable (#1514).
Links:
The text was updated successfully, but these errors were encountered: