Skip to content

Commit

Permalink
fix: every widget should be readonly if the parent container is readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Mar 12, 2024
1 parent 59cab54 commit 65971ea
Show file tree
Hide file tree
Showing 2 changed files with 2,335 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/Form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { parseOnChange } from "./helpers/onChangeParser";
import * as txml from "txml";
import Field from "./Field";
import Button from "./Button";
import Page from "./Page";

export type FormParseOptions = {
readOnly?: boolean;
Expand Down Expand Up @@ -234,7 +233,7 @@ class Form {
key: `${this._keyIdx}`,
};

if (container instanceof Page && container.readOnly) {
if (container.readOnly) {
widgetProps.readonly = true;
}

Expand Down
Loading

0 comments on commit 65971ea

Please sign in to comment.