Skip to content

Commit

Permalink
feat: 🎸 fix table onReset event bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingyun2010 committed Jan 19, 2024
1 parent 1473fb9 commit c548201
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions components/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,14 @@ function Table<RecordType extends object>(
pageNum: 1,
})
isKeepAlive && setHistoryState({})
onTableReset && onTableReset()
onSearch({
[pageNumName]: 1,
})
if (onTableReset) {
// 外部手动调用search
onTableReset()
} else {
onSearch({
[pageNumName]: 1,
})
}
}

const onChange = (
Expand Down

0 comments on commit c548201

Please sign in to comment.