diff --git a/src/app/DRE/analitico.tsx b/src/app/DRE/analitico.tsx index b8366cd..effb14d 100644 --- a/src/app/DRE/analitico.tsx +++ b/src/app/DRE/analitico.tsx @@ -956,18 +956,43 @@ export default function AnaliticoComponent({ filtros }: AnaliticoProps) { sx={{ overflowAnchor: 'none', "& .MuiDataGrid-root": { - overflowX: "auto", + display: "flex", + flexDirection: "column", + height: "100%", }, "& .MuiDataGrid-main": { - overflowX: "auto", + overflow: "visible", + position: "relative", + height: "100%", }, "& .MuiDataGrid-columnHeaders": { position: "sticky", top: 0, - backgroundColor: "#f9fafb", - zIndex: 2, + backgroundColor: "#f9fafb !important", + zIndex: 100, borderBottom: "1px solid #e5e7eb", }, + "& .MuiDataGrid-columnHeader": { + backgroundColor: "#f9fafb !important", + }, + "& .MuiDataGrid-columnHeaderRow": { + position: "sticky", + top: 0, + zIndex: 100, + backgroundColor: "#f9fafb !important", + }, + "& .MuiDataGrid-columnHeadersInner": { + position: "sticky", + top: 0, + zIndex: 100, + backgroundColor: "#f9fafb !important", + }, + // Garantir que o container dos headers não seja cortado + "& .MuiDataGrid-container--top": { + overflow: "visible", + position: "relative", + zIndex: 100, + }, "& .MuiDataGrid-cell": { borderBottom: "1px solid #f0f0f0", fontSize: "0.875rem", @@ -1005,6 +1030,12 @@ export default function AnaliticoComponent({ filtros }: AnaliticoProps) { borderBottom: "1px solid #e5e7eb", padding: "8px 16px", }, + "& .MuiDataGrid-container--bottom": { + overflow: "hidden", + }, + "& .MuiDataGrid-scrollbar": { + display: "none", + }, // Ocultar todos os ícones nativos das colunas "& .MuiDataGrid-columnHeaderMenuContainer": { display: "none !important", diff --git a/src/app/DRE/teste.tsx b/src/app/DRE/teste.tsx index 2846bd5..84475f2 100644 --- a/src/app/DRE/teste.tsx +++ b/src/app/DRE/teste.tsx @@ -2371,7 +2371,7 @@ export default function Teste() { Filtros - + Filtros @@ -2379,7 +2379,8 @@ export default function Teste() { -
+
+
{/* Período */}
@@ -2698,8 +2699,9 @@ export default function Teste() {
+
- + @@ -2779,31 +2781,31 @@ export default function Teste() { {/* Table Container */} {filtrosAplicados && !loading && !error && ( -
- {/* Scroll Container */} -
+
+ {/* Scroll Container - Apenas um container com scroll */} +
{/* Table */} {/* Table Header */} - - - + + {mesesDisponiveis.map((mes) => ( - - ))} - - @@ -2829,8 +2831,8 @@ export default function Teste() { ))}
+
Descrição + {mes} + % + Total + %
+
-
)} {/* Componente Analítico - Sempre renderizado para evitar violação das Rules of Hooks */}