Andarist / Andarist/react-textarea-autosize

fix: not working with styled-component

オープン
#399 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
2.4k
フォーク
247
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi!

### Condition

`TextareaAutosize` does not work when

- styled-components wraps `TextareaAutosize`

AND

- a state is used for value

### Symptom

I can input a single letter, but not more.

### Minimal Reproduction

```tsx
'use client'

import TextareaAutosize from 'react-textarea-autosize'
import styled from 'styled-components'
import { useState } from 'react'

export default function Temp() {
const [message, setMessage] = useState('')
const Wrapper = styled.div``

// When I remove either Wrapper or state, it works.
return (

setMessage(e.target.value)}
/>

)
}
```

Is this a bug, or is there a solution?

Thanks,

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。