Skip to content

Commit

Permalink
fix(pro table): reset search
Browse files Browse the repository at this point in the history
  • Loading branch information
TinsFox committed Dec 8, 2024
1 parent ad5038f commit bc7246c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,16 @@ export function Component() {
<div className="mb-4 text-2xl font-bold">Pro Data Table</div>
<ProTable
columns={columns}
data={users?.list ?? []}
data={users?.list}
isLoading={isLoading}
onRefresh={() => refetch()}
onRefresh={refetch}
onSearch={handleSearch}
pagination={{
pageIndex: pagination.pageIndex,
pageSize: pagination.pageSize,
total: users?.total ?? 0,
onPaginationChange: handlePaginationChange,
}}
onSearch={handleSearch}
/>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/pro-table/src/components/pro-table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export function ProTable<TData, TValue>({
Object.entries(value).filter(([, value]) => value !== ""),
)
onSearch?.(filteredValue)
onRefresh?.()
}

return (
Expand Down Expand Up @@ -121,7 +122,6 @@ export function ProTable<TData, TValue>({
...pagination,
quickJump: true,
}}

/>
</div>
</div>
Expand Down

0 comments on commit bc7246c

Please sign in to comment.