mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:15:36 +00:00
fix(T-4927): table performance bug (#4978)
This commit is contained in:
parent
bed4f2922a
commit
b13f40c455
@ -96,7 +96,7 @@ const useTableColumns = (props: { showDel?: boolean; isSubTable?: boolean }) =>
|
||||
return buf;
|
||||
}, []);
|
||||
|
||||
// const hasChangedColumns = useColumnsDeepMemoized(columnsSchema);
|
||||
const hasChangedColumns = useColumnsDeepMemoized(columnsSchema);
|
||||
|
||||
const schemaToolbarBigger = useMemo(() => {
|
||||
return css`
|
||||
@ -146,11 +146,11 @@ const useTableColumns = (props: { showDel?: boolean; isSubTable?: boolean }) =>
|
||||
);
|
||||
},
|
||||
} as TableColumnProps<any>;
|
||||
|
||||
// 这里不能把 columnsSchema 作为依赖,因为其每次都会变化,这里使用 hasChangedColumns 作为依赖
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}),
|
||||
[columnsSchema, field.value, field.address, collection, parentRecordData, schemaToolbarBigger],
|
||||
|
||||
// 这里不能把 columnsSchema 作为依赖,因为其每次都会变化,这里使用 hasChangedColumns 作为依赖
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[hasChangedColumns, field.value, field.address, collection, parentRecordData, schemaToolbarBigger],
|
||||
);
|
||||
|
||||
const tableColumns = useMemo(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user