LeoEatle / react-composition-input

The input component optimized for languages like Chinese, Japanese etc.
MIT License
83 stars 11 forks source link

Support custom component (e.g. textarea) #4

Open kevinresol opened 4 years ago

kevinresol commented 4 years ago

Also allow ref to the actual DOM element (via inputRef)

LeoEatle commented 4 years ago

Good idea about this one. But I'm considering it strange that the component name is react-composition-input but we create a textarea. How about creating a HOC component so we can provide attributes and callback for handling child component? But in this way it is not easy to use.

Maybe I will merge it in a few weeks.

kevinresol commented 4 years ago

"input" doesn't necessarily refer to the DOM element. Generally speaking, textarea is also an input.