fix(filters): limit textarea height (#921)

* limit textarea height to 10 rows

* remove overflow-hidden from TextAreaAutoResize to make it scrollable
This commit is contained in:
martylukyy 2023-05-08 22:44:03 +02:00 committed by GitHub
parent 762a0bb36b
commit 759b17c9f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,6 +340,7 @@ export const RegexTextAreaField = ({
<TextareaAutosize
{...field}
id={name}
maxRows={10}
defaultValue={defaultValue}
autoComplete={autoComplete}
className={classNames(
@ -500,12 +501,13 @@ export const TextAreaAutoResize = ({
{...field}
id={name}
rows={rows}
maxRows={10}
defaultValue={defaultValue}
autoComplete={autoComplete}
className={classNames(
meta.touched && meta.error ? "focus:ring-red-500 focus:border-red-500 border-red-500" : "focus:ring-blue-500 dark:focus:ring-blue-500 focus:border-blue-500 dark:focus:border-blue-500 border-gray-300 dark:border-gray-700",
disabled ? "bg-gray-100 dark:bg-gray-700 cursor-not-allowed" : "dark:bg-gray-800",
"overflow-hidden mt-2 block w-full dark:text-gray-100 rounded-md"
"mt-2 block w-full dark:text-gray-100 rounded-md"
)}
placeholder={placeholder}
disabled={disabled}