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.
2 parents 1e49a8e + 69c4995 commit 9f8e12dCopy full SHA for 9f8e12d
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