Skip to content

Commit

Permalink
fix maxLength on textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
RobMayer committed Jun 28, 2024
1 parent 436bed4 commit 76aaf76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jsx-in-ttpg",
"license": "UNLICENSE",
"version": "2.2.3",
"version": "2.2.4",
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts --no-splitting",
"clean": "rm -rf ./dist",
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,9 @@ const textareaElement = (attrs: JSX.IntrinsicElements["textarea"], children?: st
if (attrs.onChangeActual) {
element.onTextChanged.add(attrs.onChangeActual);
}
if (attrs.maxLength !== undefined) {
element.setMaxLength(attrs.maxLength);
}
if (attrs.onCommit) {
element.onTextCommitted.add((s, p, v) => {
if (p !== undefined) {
Expand Down

0 comments on commit 76aaf76

Please sign in to comment.