message: fix(Textarea): Set to initial 'lines' when value cleared in 'grow' mode
diff: @@ -54,7 +54,8 @@ const pxToInt = (str: string | null) =>
  const calculateLines = (
  target: HTMLTextAreaElement,
  - lineLimit: TextareaProps['lineLimit'],
  + lines: number,
  + lineLimit?: number,
  ) => {
  const { paddingBottom, paddingTop, lineHeight } = window.getComputedStyle(
  target,
  @@ -65,6 +66,10 @@ const calculateLines = (
  (target.scrollHeight - padding) / pxToInt(lineHeight),
  );
  + if (target && target.value === '') {
  + return lines;
  + }
  +
  return typeof lineLimit === 'number' && currentRows > lineLimit
  ? lineLimit
  : currentRows;
  @@ -105,7 +110,7 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
  value={value}
  onChange={(e: ChangeEvent<HTMLTextAreaElement>) => {
  if (grow) {
  - setRows(calculateLines(e.target, lineLimit));
  + setRows(calculateLines(e.target, lines, lineLimit));
  }
  if (typeof onChange === 'function') {
  onChange(e);
  