Loading web/src/components/sa_panel_town/sa_panel_town_list/sa_panel_town_list_element/assets/css/styles.css 0 → 100644 +13 −0 Original line number Diff line number Diff line .town_list_table { height: 100%; } .bhFeAR{ display: flex !important; height: 100%; } .rdt_TableBody{ max-height: 100%; overflow-y: auto; } No newline at end of file web/src/components/sa_panel_town/sa_panel_town_list/sa_panel_town_list_element/sa_panel_town_table.tsx 0 → 100644 +37 −0 Original line number Diff line number Diff line import { Dispatch, SetStateAction, useEffect } from "react"; import { Town } from "../../../../infraestructure/entities/town"; import "./assets/css/styles.css"; import DataTable, { TableColumn } from "react-data-table-component"; interface props { towns: Town[]; setIsLoading: Dispatch<SetStateAction<boolean>>; } export const TownListTable= ({towns, setIsLoading}: props) => { const columns : TableColumn<Town>[] = [ { name: "Identificador", selector: row => row.idTown }, { name: "Nombre", selector: row => row.name, sortable: true }, { name: "Estado", selector: row => row.state } ]; useEffect(() => { setIsLoading(false); }, []); return ( <div> <DataTable columns={columns} data={towns} selectableRows className="town_list_table"/> </div> ); } No newline at end of file Loading
web/src/components/sa_panel_town/sa_panel_town_list/sa_panel_town_list_element/assets/css/styles.css 0 → 100644 +13 −0 Original line number Diff line number Diff line .town_list_table { height: 100%; } .bhFeAR{ display: flex !important; height: 100%; } .rdt_TableBody{ max-height: 100%; overflow-y: auto; } No newline at end of file
web/src/components/sa_panel_town/sa_panel_town_list/sa_panel_town_list_element/sa_panel_town_table.tsx 0 → 100644 +37 −0 Original line number Diff line number Diff line import { Dispatch, SetStateAction, useEffect } from "react"; import { Town } from "../../../../infraestructure/entities/town"; import "./assets/css/styles.css"; import DataTable, { TableColumn } from "react-data-table-component"; interface props { towns: Town[]; setIsLoading: Dispatch<SetStateAction<boolean>>; } export const TownListTable= ({towns, setIsLoading}: props) => { const columns : TableColumn<Town>[] = [ { name: "Identificador", selector: row => row.idTown }, { name: "Nombre", selector: row => row.name, sortable: true }, { name: "Estado", selector: row => row.state } ]; useEffect(() => { setIsLoading(false); }, []); return ( <div> <DataTable columns={columns} data={towns} selectableRows className="town_list_table"/> </div> ); } No newline at end of file