feat(controlPanel): add integer validation for rows per page setting (#36289)

This commit is contained in:
om pharate
2025-11-29 01:59:17 +05:30
committed by GitHub
parent d5c5dbb3bf
commit 01f032017f
2 changed files with 6 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ import {
ensureIsArray,
isAdhocColumn,
isPhysicalColumn,
legacyValidateInteger,
validateInteger,
QueryFormColumn,
QueryMode,
SMART_DATE_ID,
@@ -407,6 +407,7 @@ const config: ControlPanelConfig = {
description: t('Rows per page, 0 means no pagination'),
visibility: ({ controls }: ControlPanelsContainerProps) =>
Boolean(controls?.server_pagination?.value),
validators: [validateInteger],
},
},
],
@@ -425,7 +426,7 @@ const config: ControlPanelConfig = {
state?.common?.conf?.SQL_MAX_ROW,
}),
validators: [
legacyValidateInteger,
validateInteger,
(v, state) =>
validateMaxValue(
v,