chore: handle Textarea component ref warning in react 19 (#16818)

This commit is contained in:
Joel 2025-03-26 14:55:02 +08:00 • committed by GitHub
commit 032d849f17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 75 additions and 74 deletions

View file

@ -3,7 +3,7 @@ import {
useCallback,
useState,
} from 'react'
import Textarea from 'rc-textarea'
import Textarea from 'react-textarea-autosize'
import { useTranslation } from 'react-i18next'
type TitleInputProps = {
@ -71,7 +71,7 @@ export const DescriptionInput = memo(({
<Textarea
value={value}
onChange={e => onChange(e.target.value)}
rows={1}
minRows={1}
onFocus={handleFocus}
onBlur={handleBlur}
className={`
@ -80,7 +80,6 @@ export const DescriptionInput = memo(({
outline-none placeholder:text-gray-400
`}
placeholder={t('workflow.common.addDescription') || ''}
autoSize
/>
</div>
)