mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Fix null style
This commit is contained in:
parent
eb203a0498
commit
1383296861
1 changed files with 4 additions and 2 deletions
|
@ -1474,8 +1474,10 @@ const Textarea = forwardRef((props, ref) => {
|
||||||
if (!textarea) return;
|
if (!textarea) return;
|
||||||
const resizeObserver = new ResizeObserver(() => {
|
const resizeObserver = new ResizeObserver(() => {
|
||||||
// Get height of textarea, set height to textExpander
|
// Get height of textarea, set height to textExpander
|
||||||
|
if (textExpanderRef.current) {
|
||||||
const { height } = textarea.getBoundingClientRect();
|
const { height } = textarea.getBoundingClientRect();
|
||||||
textExpanderRef.current.style.height = height + 'px';
|
textExpanderRef.current.style.height = height + 'px';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
resizeObserver.observe(textarea);
|
resizeObserver.observe(textarea);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
Loading…
Reference in a new issue