Skip to content

Commit

Permalink
feat: added support for MaxLen (TextInput)
Browse files Browse the repository at this point in the history
  • Loading branch information
natterstefan committed Jan 30, 2025
1 parent 2493b99 commit 0021042
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/render/src/utils/parseFormOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const parseTextFieldOptions = (node, formField) => {
noSpell: node.props?.noSpell || false,
format: node.props?.format || undefined,
fontSize: node.props?.fontSize || undefined,
MaxLen: node.props?.maxLength || undefined,
});
};

Expand Down
4 changes: 4 additions & 0 deletions packages/renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ declare namespace ReactPDF {
* Sets the fontSize (default or 0 means auto sizing)
*/
fontSize?: number;
/**
* Sets the maximum length (characters) of the text in the field
*/
maxLength?: number;
}

export class TextInput extends React.Component<TextInputProps> {}
Expand Down

0 comments on commit 0021042

Please sign in to comment.