diff --git a/.changeset/fuzzy-trains-sneeze.md b/.changeset/fuzzy-trains-sneeze.md new file mode 100644 index 00000000..f2e319a8 --- /dev/null +++ b/.changeset/fuzzy-trains-sneeze.md @@ -0,0 +1,5 @@ +--- +"react-textarea-autosize": minor +--- + +Set inline style's `height` property with the `"important"` priority. diff --git a/src/index.tsx b/src/index.tsx index e55952c9..f9763160 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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); } };