Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Commit ca28742

Browse files
authored
Merge pull request #8 from aerogear/disable-nested
2 parents 7e35d9c + 1f1e265 commit ca28742

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/NestField.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type NestFieldProps = {
99
fields?: any[];
1010
itemProps?: object;
1111
showInlineError?: boolean;
12+
disabled?: boolean;
1213
name: string;
1314
} & HTMLProps<HTMLDivElement>;
1415

@@ -21,6 +22,7 @@ const Nest = ({
2122
label,
2223
name,
2324
showInlineError,
25+
disabled,
2426
...props
2527
}: NestFieldProps) => {
2628

@@ -32,7 +34,7 @@ const Nest = ({
3234
{children
3335
? injectName(name, children)
3436
: fields?.map(key => (
35-
<AutoField key={key} isDisabled={props.disabled} name={joinName(name, key)} {...itemProps} />
37+
<AutoField key={key} disabled={disabled} name={joinName(name, key)} {...itemProps} />
3638
))}
3739
</div>
3840
);

0 commit comments

Comments
 (0)