Skip to content

Commit

Permalink
fix: reset search cursor before search
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxing9 committed Nov 20, 2024
1 parent 4c2b938 commit 2d79fcf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export const SearchButton = (props: ISearchButtonProps) => {
<div className="flex flex-1 justify-between overflow-hidden">
<input
ref={ref}
className="placeholder:text-muted-foregrounds w-0 grow rounded-md bg-transparent px-1 outline-none"
className="placeholder:text-muted-foregrounds min-w-0 grow rounded-md bg-transparent px-1 outline-none"
placeholder={t('actions.search')}
autoComplete="off"
autoCorrect="off"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const SearchCountPagination = forwardRef<
JSON.stringify(searchQuery),
],
queryFn: async () => {
setSearchCursor(null);
const nextMap = await getNextIndex();
if (totalCount <= PaginationBuffer) {
return nextMap;
Expand Down

0 comments on commit 2d79fcf

Please sign in to comment.