Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom props to be passed alongside custom text area component #206

Open
xchau opened this issue Sep 12, 2020 · 1 comment
Open

Allow custom props to be passed alongside custom text area component #206

xchau opened this issue Sep 12, 2020 · 1 comment

Comments

@xchau
Copy link

xchau commented Sep 12, 2020

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 }}
    ...
/>
@jukben
Copy link
Collaborator

jukben commented Sep 12, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants