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

(cherry picked from commit 01f032017f)
This commit is contained in:
om pharate
2025-12-01 14:46:28 -08:00
committed by Joe Li
parent 8f061d0c0a
commit 3a537498f6
5 changed files with 15 additions and 14 deletions
@@ -47,7 +47,7 @@ import {
isAdhocColumn,
isFeatureEnabled,
isPhysicalColumn,
legacyValidateInteger,
validateInteger,
QueryFormColumn,
QueryMode,
SMART_DATE_ID,
@@ -387,6 +387,7 @@ const config: ControlPanelConfig = {
description: t('Rows per page, 0 means no pagination'),
visibility: ({ controls }: ControlPanelsContainerProps) =>
Boolean(controls?.server_pagination?.value),
validators: [validateInteger],
},
},
],
@@ -405,7 +406,7 @@ const config: ControlPanelConfig = {
state?.common?.conf?.SQL_MAX_ROW,
}),
validators: [
legacyValidateInteger,
validateInteger,
(v, state) =>
validateMaxValue(
v,