mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-16 14:50:15 +08:00
dbeaver/pro#10056 adjust height in frame (#4509)
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
This commit is contained in:
@@ -45,7 +45,11 @@ export const AutoResizeTextarea: Props = observer(function AutoResizeTextarea({
|
||||
}, []);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
adjustHeight();
|
||||
const frame = requestAnimationFrame(() => {
|
||||
adjustHeight();
|
||||
});
|
||||
|
||||
return () => cancelAnimationFrame(frame);
|
||||
}, [value, adjustHeight]);
|
||||
|
||||
const mergedRef = useMergeRefs(...[innerRef, ref!].filter(Boolean));
|
||||
|
||||
Reference in New Issue
Block a user