Andarist / Andarist/react-textarea-autosize
fix: not working with styled-component
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.4k
- Forks
- 247
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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,
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.