💨
動的にTextInputの高さを変更したい!
import { Textarea } from "@chakra-ui/core";
import ResizeTextarea from "react-textarea-autosize";
import React from "react";
export const AutoResizeTextarea = React.forwardRef((props, ref) => {
return (
<Textarea
minH="unset"
overflow="hidden"
w="100%"
resize="none"
ref={ref}
minRows={1}
as={ResizeTextarea}
{...props}
/>
);
});
Discussion