fix(Table): fix disappearing content after selecting a row (#3726)

This commit is contained in:
Zeke Zhang 2024-03-15 14:14:41 +08:00 committed by GitHub
parent 8be6f9078f
commit b0705843e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,15 +145,7 @@ export const useTableBlockProps = () => {
field.componentProps.pagination.total = ctx?.service?.data?.meta?.count;
field.componentProps.pagination.current = ctx?.service?.data?.meta?.page;
}
}, [
ctx?.field?.data?.selectedRowKeys,
ctx?.service?.data?.data,
ctx?.service?.data?.meta?.count,
ctx?.service?.data?.meta?.page,
ctx?.service?.data?.meta?.pageSize,
ctx?.service?.loading,
field,
]);
}, [ctx?.service?.data, ctx?.service?.loading]); // 这里如果依赖了 ctx?.field?.data?.selectedRowKeys 的话,会导致这个问题:
return {
childrenColumnName: ctx.childrenColumnName,
loading: ctx?.service?.loading,