useTextareaAutoSize

resizes a text area to always fit the content

Demo

Usage

const [const ref: Kaioken.RefObject<HTMLTextAreaElement>ref, const value: stringvalue] = useModel<HTMLTextAreaElement, string>(initial: string): readonly [Kaioken.RefObject<HTMLTextAreaElement>, string, (newValue: string) => void]useModel<HTMLTextAreaElement>(
  "Press enter to resize text area"
)
const 
const controls: {
    update: () => void;
}
controls
=
function useTextareaAutoSize(ref: Kaioken.MutableRefObject<HTMLTextAreaElement | null>, options?: TextAreaResizeOptions): {
    update: () => void;
}
useTextareaAutoSize
(const ref: Kaioken.RefObject<HTMLTextAreaElement>ref)