perf: do not send minRows and maxRows undefined values to client (#10600)
This reduces the size of the initial HTML
This commit is contained in:
@@ -120,14 +120,14 @@ export const sanitizeFields = async ({
|
|||||||
console.warn(
|
console.warn(
|
||||||
`(payload): The "min" property is deprecated for the Relationship field "${field.name}" and will be removed in a future version. Please use "minRows" instead.`,
|
`(payload): The "min" property is deprecated for the Relationship field "${field.name}" and will be removed in a future version. Please use "minRows" instead.`,
|
||||||
)
|
)
|
||||||
|
field.minRows = field.min
|
||||||
}
|
}
|
||||||
if (field.max && !field.maxRows) {
|
if (field.max && !field.maxRows) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`(payload): The "max" property is deprecated for the Relationship field "${field.name}" and will be removed in a future version. Please use "maxRows" instead.`,
|
`(payload): The "max" property is deprecated for the Relationship field "${field.name}" and will be removed in a future version. Please use "maxRows" instead.`,
|
||||||
)
|
)
|
||||||
|
field.maxRows = field.max
|
||||||
}
|
}
|
||||||
field.minRows = field.minRows || field.min
|
|
||||||
field.maxRows = field.maxRows || field.max
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field.type === 'upload') {
|
if (field.type === 'upload') {
|
||||||
|
|||||||
Reference in New Issue
Block a user