question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't display Modal programmatically

See original GitHub issue

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:

  • one for adding courses - default ModalWrapper button -
  • another for editing I tried to trigger click event of the ModalWrapper button to display the modal by calling document.getElementById('formModal').click(); when user clicks the edit button but it didn’t work.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
asudohcommented, Oct 7, 2020

Weighing in; <Modal> or <ComposedModal> serves the exact purpose here, they can be controlled by open prop. I believe @emyarod has had a doc updated around this topic.

0reactions
NourEldinShobiercommented, Oct 7, 2020

Thank you so much =D

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I trigger a Bootstrap modal programmatically?
In order to manually show the modal pop up you have to do this $('#myModal').modal('show');. You previously need to initialize it with show: ......
Read more >
Can't open modal programmatically · Issue #228 - GitHub
Hi! When I change visible prop value the modal does not show. It only uses the initial state of visible.
Read more >
Show ModalPopup programmatically - MSDN - Microsoft
I want to use ModalPopup on a MasterPage which will have a method ShowMessage(message). I created masterpage and drop ModalPopupExtender on it.
Read more >
How to Open and Close a React-Bootstrap Modal ... - Pluralsight
You can use the show and onHide props to display and run a callback when the modal is hidden. In this guide, you'll...
Read more >
Bootstrap JS Modal Reference - W3Schools
The Modal plugin is a dialog box/popup window that is displayed on top of the current page. For a tutorial about Modals, read...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found