-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Can't display Modal programmatically #6980
Comments
Can you recreate your issue on CodeSandbox so we can assist in debugging? |
Here it's https://codesandbox.io/s/vigilant-dream-e3m1e?file=/src/index.js .... I want to be able to show the modal and fill the form when the selected course edit button is clicked |
Weighing in; |
yes, I would recommend using |
Thank you so much =D |
What package(s) are you using?
carbon-components
carbon-components-react
Summary
Can't trigger
ModalWrapper
to display the modal remotely.Relevant information
My
ModalWrapper
holds a form for adding/editing courses, and I have two buttons:ModalWrapper
button -I tried to trigger click event of the
ModalWrapper
button to display the modal by callingdocument.getElementById('formModal').click();
when user clicks the edit button but it didn't work.The text was updated successfully, but these errors were encountered: