@archbase/components 4.0.22 → 4.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archbase/components",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.23",
|
|
4
4
|
"description": "UI Components for Archbase React v3 - Form editors, data visualization, and business components",
|
|
5
5
|
"author": "Edson Martins <edsonmartins2005@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"vis-timeline": "^7.7.3",
|
|
119
119
|
"xlsx": "^0.18.5",
|
|
120
120
|
"yet-another-react-lightbox": "^3.21.0",
|
|
121
|
-
"@archbase/core": "4.0.
|
|
122
|
-
"@archbase/data": "4.0.
|
|
123
|
-
"@archbase/layout": "4.0.
|
|
121
|
+
"@archbase/core": "4.0.23",
|
|
122
|
+
"@archbase/data": "4.0.23",
|
|
123
|
+
"@archbase/layout": "4.0.23"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@types/d3": "^7.4.3",
|
|
@@ -757,7 +757,11 @@ function ArchbaseDataGrid<T extends object = any, ID = any>(props: ArchbaseDataG
|
|
|
757
757
|
)
|
|
758
758
|
|
|
759
759
|
// Configurar estilos personalizados para o grid
|
|
760
|
-
|
|
760
|
+
// Memoizado para evitar regenerar o objeto sx massivo a cada render — sem isso,
|
|
761
|
+
// o emotion regera centenas de classes CSS sempre que o pai re-renderiza, o que
|
|
762
|
+
// torna o scroll lento porque cada linha que entra/sai do viewport durante a
|
|
763
|
+
// virtualização aciona o pipeline de styling pesado.
|
|
764
|
+
const themedStyles = useMemo(() => {
|
|
761
765
|
return {
|
|
762
766
|
root: {
|
|
763
767
|
height: '100%', // Garante que o DataGrid ocupe toda a altura do container
|
|
@@ -1044,7 +1048,23 @@ function ArchbaseDataGrid<T extends object = any, ID = any>(props: ArchbaseDataG
|
|
|
1044
1048
|
}
|
|
1045
1049
|
}
|
|
1046
1050
|
}
|
|
1047
|
-
}
|
|
1051
|
+
}, [
|
|
1052
|
+
theme,
|
|
1053
|
+
colorScheme,
|
|
1054
|
+
withBorder,
|
|
1055
|
+
withColumnBorders,
|
|
1056
|
+
cellPadding,
|
|
1057
|
+
striped,
|
|
1058
|
+
highlightOnHover,
|
|
1059
|
+
fontSize
|
|
1060
|
+
])
|
|
1061
|
+
|
|
1062
|
+
// Ref estável para getRowId — evita que o MUI DataGrid reconstrua o mapeamento
|
|
1063
|
+
// interno de linhas a cada render, o que invalida virtualização e performance de scroll.
|
|
1064
|
+
const stableGetRowId = useCallback(
|
|
1065
|
+
(row: any) => safeGetRowId(row, getRowId) || '',
|
|
1066
|
+
[getRowId]
|
|
1067
|
+
)
|
|
1048
1068
|
|
|
1049
1069
|
// Calcular a altura total da grid, incluindo os painéis de detalhes
|
|
1050
1070
|
const gridHeight = useMemo(() => {
|
|
@@ -1614,8 +1634,8 @@ function ArchbaseDataGrid<T extends object = any, ID = any>(props: ArchbaseDataG
|
|
|
1614
1634
|
onRowSelectionModelChange={handleSelectionModelChange}
|
|
1615
1635
|
onCellDoubleClick={handleCellDoubleClick}
|
|
1616
1636
|
onColumnVisibilityModelChange={setColumnVisibilityModel}
|
|
1617
|
-
getRowId={
|
|
1618
|
-
sx={
|
|
1637
|
+
getRowId={stableGetRowId}
|
|
1638
|
+
sx={themedStyles.root}
|
|
1619
1639
|
disableColumnFilter={!allowColumnFilters}
|
|
1620
1640
|
disableColumnMenu={true}
|
|
1621
1641
|
hideFooter={hideFooter}
|
|
Binary file
|