Skip to content

Commit e40a4b7

Browse files
fix(ui): shows minRowsProp instead of minRows (#14681)
Initially: <img width="958" height="135" alt="image" src="https://github.com/user-attachments/assets/098cbe10-5f4b-4d66-bc59-8d6ba5567382" /> Now says the _total_ number of rows required in the validation message which matches the config `minRows` property: <img width="964" height="128" alt="image" src="https://github.com/user-attachments/assets/ec334cf1-265d-4134-b67c-fb84008fcac8" /> # Array Field ```ts { name: 'arrayWithMinRows', fields: [ { name: 'text', type: 'text', }, ], minRows: 2, // <--- type: 'array', required: true, }, ```
1 parent c455f58 commit e40a4b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ui/src/fields/Array/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const ArrayFieldComponent: ArrayFieldClientComponent = (props) => {
6767

6868
const schemaPath = schemaPathFromProps ?? name
6969

70-
const minRows = (minRowsProp ?? required) ? 1 : 0
70+
const minRows = minRowsProp ?? (required ? 1 : 0)
7171

7272
const { setDocFieldPreferences } = useDocumentInfo()
7373
const {

0 commit comments

Comments
 (0)