Skip to content

Commit 053eed9

Browse files
committed
fix(shared): set fixed pagination limit for initial item fetch
- Set pagination limit to 20 for initial fetch to ensure proper infinite scrolling functionality - Added comment提醒 do not lower the limit below 20 for the initial fetch
1 parent 31c3530 commit 053eed9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/shared/widgets/selection_page/bloc/searchable_selection_bloc.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ class SearchableSelectionBloc
9999
final response = await (_arguments.repository!).readAll(
100100
filter: finalFilter,
101101
sort: _arguments.sortOptions,
102-
pagination: PaginationOptions(limit: _arguments.limit),
102+
pagination: const PaginationOptions(
103+
limit: 20,
104+
), // Do nto lower it below 20 for the initial fetch, if the list items did not reach the bottom of the screen, the infinity scrolling will not function.
103105
);
104106

105107
fetchedItems = response.items;

0 commit comments

Comments
 (0)