Skip to content

Commit

Permalink
Fix broken setProperty call (#280)
Browse files Browse the repository at this point in the history
* fix: use string for `height` property

* Create rude-squids-tickle.md

Co-authored-by: Mateusz Burzyński <[email protected]>
  • Loading branch information
emdotem and Andarist authored Jun 24, 2020
1 parent 423eb42 commit b7c227a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rude-squids-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-textarea-autosize": patch
---

Fixed a broken call to `setProperty` that has prevented the library to work correctly.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const TextareaAutosize: React.ForwardRefRenderFunction<

if (heightRef.current !== height) {
heightRef.current = height;
node.style.setProperty(height, `${height}px`, 'important');
node.style.setProperty("height", `${height}px`, 'important');
onHeightChange(height);
}
};
Expand Down

0 comments on commit b7c227a

Please sign in to comment.