SITUATION #1: I have tables with different styles. When I go back to Table №1, Table №3, and Table №4 it takes styles from Table №2. How can I apply styles to Table №2 for this table only? Is there a style prefix for different tables?
The global style for Table №1, Table №3, and Table №4 are called grid-custom.css:
.ag-root {
border-radius: 30px;
}
For Table №2 I have local styles called grid.css:
.ag-root {
border-radius: 0;
}
return:
return (
<AgGridReact
ref={ref}
rowData={rowData}
columnDefs={columnDefs}
defaultColDef={{ resizable: true }}
rowHeight={60}
headerHeight={50}
onFirstDataRendered={onFirstDataRenderedSchoolTeam}
onGridSizeChanged={() => onGridSizeChanged(ref)}
/>
)
====================================================
The first situation is done. When just one id is applied to the table it works.
SITUATION #2:
I have global styles that apply to two tables. But after global styles, I need to apply a separate style for each table border-radius. In this case works just for #table1. Why? Same styles:
#table1 .ag-root {
border-radius: 30px;
};
#table2 .ag-root {
border-radius: 0;
};
Id for each table:
<div className="container-tables">
<div id="table1">
<TableOne
rowData={rowDataOne}
...
/>
</div>
<div id="table2">
<TableTwo
rowData={rowDataTwo}
...
/>
</div>
</div>
and same return for both:
return (
<AgGridReact
ref={ref}
rowData={rowData}
columnDefs={columnDefs}
defaultColDef={{ resizable: true }}
rowHeight={60}
headerHeight={50}
onFirstDataRendered={onFirstDataRenderedSchoolTeam}
onGridSizeChanged={() => onGridSizeChanged(ref)}
/>
)