Skip to content

Commit

Permalink
Add !important to the inline height property (#278)
Browse files Browse the repository at this point in the history
* fix: add `!important` to inline height property

* Add changeset about adding important priority to the inline height

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
  • Loading branch information
emdotem and Andarist committed Jun 16, 2020
1 parent 88410ee commit 722e10a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-trains-sneeze.md
@@ -0,0 +1,5 @@
---
"react-textarea-autosize": minor
---

Set inline style's `height` property with the `"important"` priority.
2 changes: 1 addition & 1 deletion src/index.tsx
Expand Up @@ -75,7 +75,7 @@ const TextareaAutosize: React.ForwardRefRenderFunction<

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

0 comments on commit 722e10a

Please sign in to comment.