SemmyWong 12f58effad
refactor: code splitting of the table component (#121)
* refactor: 表格拆分模块化

* refactor: 表格拆分模块化

* refactor: code splitting of the table component (#120)

* missing TableIndex

* refactor: 表格拆分模块化

* code format

Co-authored-by: chenos <chenlinxh@gmail.com>
2021-12-02 22:56:16 +08:00

11 lines
241 B
TypeScript

import { useTable } from './useTable';
export const useTotal = () => {
const {
field,
service,
props: { clientSidePagination },
} = useTable();
return clientSidePagination ? field?.value?.length : service?.data?.total;
};