mirror of
https://github.com/immich-app/immich.git
synced 2025-11-09 16:23:13 -05:00
* refactor: reusable autogrow * fix: remove useless autogrow * fix: correct size for album description * fix: format * fix: move to own file * refactor: album description * refactor: asset description * simplify * fix: style when no description provided * fix: switching assets * feat: update description with ctrl + enter * fix: variable name * fix: styling --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
6 lines
202 B
TypeScript
6 lines
202 B
TypeScript
export const autoGrowHeight = (textarea: HTMLTextAreaElement, height = 'auto') => {
|
|
textarea.scrollHeight;
|
|
textarea.style.height = height;
|
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
};
|