We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1a4edf commit 0736798Copy full SHA for 0736798
src/hooks/web/useTable.ts
@@ -136,9 +136,7 @@ export const useTable = <T = any>(config?: UseTableConfig<T>) => {
136
})
137
if (res) {
138
tableObject.tableList = (res as unknown as ResponseType).list
139
- if ((res as unknown as ResponseType).total) {
140
- tableObject.total = (res as unknown as ResponseType).total as unknown as number
141
- }
+ tableObject.total = (res as unknown as ResponseType).total ?? 0
142
}
143
},
144
setProps: async (props: TableProps = {}) => {
0 commit comments