mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-06-12 13:23:12 +00:00
6 lines
221 B
TypeScript
6 lines
221 B
TypeScript
export function expandOnTyping(element: HTMLTextAreaElement) {
|
|
element.oninput = () => {
|
|
element.style.height = ""; // skipcq: JS-W1032
|
|
element.style.height = `${element.scrollHeight + 2}px`;
|
|
};
|
|
}
|