mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 15:21:48 +03: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;
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
// Get height of textarea, set height to textExpander
|
||||
const { height } = textarea.getBoundingClientRect();
|
||||
textExpanderRef.current.style.height = height + 'px';
|
||||
if (textExpanderRef.current) {
|
||||
const { height } = textarea.getBoundingClientRect();
|
||||
textExpanderRef.current.style.height = height + 'px';
|
||||
}
|
||||
});
|
||||
resizeObserver.observe(textarea);
|
||||
}, []);
|
||||
|
|
Loading…
Add table
Reference in a new issue