mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
fix: Public share search offset is incorrect (#9465)
This commit is contained in:
1 parent
4562edfda0
commit
ecd5afa6cd
1 file changed
+4
-1
@@ -150,12 +150,15 @@ const PaginatedList = <T extends PaginatedItem>({
|
||||
offset,
|
||||
...options,
|
||||
});
|
||||
if (!results) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (offset !== 0) {
|
||||
setRenderCount((prevCount) => prevCount + limit);
|
||||
}
|
||||
|
||||
if (results && (results.length === 0 || results.length < limit)) {
|
||||
if (results.length === 0 || results.length < limit) {
|
||||
setAllowLoadMore(false);
|
||||
} else {
|
||||
setOffset((prevOffset) => prevOffset + limit);
|
||||
|
||||
Reference in new issue
Block a user