mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat(controlPanel): add integer validation for rows per page setting (#36289)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user