Limit max page size
This commit is contained in:
1 parent
1956441d52
commit
3fc0b1740d
1 file changed
+4
-1
@@ -27,6 +27,8 @@ interface Attribute {
|
||||
type?: string;
|
||||
}
|
||||
|
||||
const MAX_PAGE_SIZE = 200;
|
||||
|
||||
function renderTable(
|
||||
attributes: Attribute[],
|
||||
data: Record<string, any>[],
|
||||
@@ -180,7 +182,8 @@ function renderTable(
|
||||
{
|
||||
title: "Show more records",
|
||||
onclick: showMoreCallback,
|
||||
disabled: !data.length || records.length >= total,
|
||||
disabled:
|
||||
!data.length || records.length >= Math.min(MAX_PAGE_SIZE, total),
|
||||
},
|
||||
"More"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user