react-textarea-autocomplete icon indicating copy to clipboard operation
react-textarea-autocomplete copied to clipboard

Allow custom props to be passed alongside custom text area component

Open xchau opened this issue 3 years ago • 1 comments

I am using my own "textarea" component that does some text manipulations under the hood, like so:

const CustomTextArea= React.forwardRef((props, ref) => { // Prop-dependent logic here }

However, my issue is that CustomTextArea's custom logic is dependent on an upstream node's props. Is there a way for me to pass down that upstream node's props? I'm imagining something like:

<ReactTextareaAutocomplete
    ...
    textAreaComponent={{ component: CustomTextArea, props: // Custom props here }}
    ...
/>

xchau avatar Sep 12 '20 03:09 xchau

Hey this is unfortunately not possible. I recommend to make fork with this feature. Another way is to use patch-package. https://github.com/ds300/patch-package

jukben avatar Sep 12 '20 16:09 jukben