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
parent c451f54925
commit 032d849f17
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>
)