@archbase/components 4.0.22 → 4.0.24
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/dist/index.js
CHANGED
|
@@ -25745,7 +25745,7 @@ function OC(e) {
|
|
|
25745
25745
|
csvOptions: Ae,
|
|
25746
25746
|
toolbarAlignment: q = "right",
|
|
25747
25747
|
positionActionsColumn: le = "first",
|
|
25748
|
-
actionsColumnWidth: pe =
|
|
25748
|
+
actionsColumnWidth: pe = 120,
|
|
25749
25749
|
toolbarLeftContent: Ce,
|
|
25750
25750
|
bottomToolbarMinHeight: je,
|
|
25751
25751
|
paginationLabels: Ke,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archbase/components",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.24",
|
|
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.24",
|
|
122
|
+
"@archbase/data": "4.0.24",
|
|
123
|
+
"@archbase/layout": "4.0.24"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@types/d3": "^7.4.3",
|
|
@@ -175,7 +175,7 @@ function ArchbaseDataGridAG<T extends object = any, ID = any>(
|
|
|
175
175
|
csvOptions,
|
|
176
176
|
toolbarAlignment = 'right',
|
|
177
177
|
positionActionsColumn = 'first',
|
|
178
|
-
actionsColumnWidth =
|
|
178
|
+
actionsColumnWidth = 120,
|
|
179
179
|
toolbarLeftContent,
|
|
180
180
|
bottomToolbarMinHeight,
|
|
181
181
|
paginationLabels,
|
|
@@ -156,7 +156,7 @@ function ArchbaseDataGrid<T extends object = any, ID = any>(props: ArchbaseDataG
|
|
|
156
156
|
csvOptions,
|
|
157
157
|
toolbarAlignment = 'right',
|
|
158
158
|
positionActionsColumn = 'first',
|
|
159
|
-
actionsColumnWidth =
|
|
159
|
+
actionsColumnWidth = 120,
|
|
160
160
|
toolbarLeftContent,
|
|
161
161
|
columnAutoWidth = false,
|
|
162
162
|
rowHeight = 52,
|
|
@@ -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
|