Skip to content

Commit 68fe827

Browse files
committed
fix(TableSelect): update pagination logic to fetch partition tables with correct skip and limit parameters
1 parent a4bb70d commit 68fe827

File tree

1 file changed

+5
-3
lines changed
  • packages/dag/src/components/form/table-select

1 file changed

+5
-3
lines changed

packages/dag/src/components/form/table-select/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,19 @@ export const TableSelect = connect(
227227
if (props.hasPartition) {
228228
const res = await getPagePartitionTables({
229229
connectionId: props.connectionId,
230-
limit: 0,
230+
skip: (filter.page - 1) * (filter.size || 20),
231+
limit: filter.size || 20,
231232
syncPartitionTableEnable: props.syncPartitionTableEnable,
233+
keyword: filter.where?.value?.like,
232234
})
233235
return {
234-
items: res.items.map((it) => ({
236+
items: res.items.map((it: any) => ({
235237
label:
236238
it.tableName +
237239
(it.tableComment ? `(${it.tableComment})` : ''),
238240
value: it.tableName,
239241
})),
240-
total: cacheTables.length,
242+
total: res.total,
241243
}
242244
} else {
243245
return props.method(filter, config)

0 commit comments

Comments
 (0)