mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(web): descriptions (#6517)
* 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>
This commit is contained in:
parent
95cfe22866
commit
3845fec280
5 changed files with 97 additions and 124 deletions
5
web/src/lib/utils/autogrow.ts
Normal file
5
web/src/lib/utils/autogrow.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export const autoGrowHeight = (textarea: HTMLTextAreaElement, height = 'auto') => {
|
||||
textarea.scrollHeight;
|
||||
textarea.style.height = height;
|
||||
textarea.style.height = `${textarea.scrollHeight}px`;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue