Skip to content

The open alternative to Salesforce, designed for AI.

268 B
Raw Blame
export const resizeTextareaToContent = (textarea: HTMLTextAreaElement) => {
  textarea.style.blockSize = 'auto';

  const borderBlockSize = textarea.offsetHeight - textarea.clientHeight;

  textarea.style.blockSize = `${textarea.scrollHeight + borderBlockSize}px`;
};