Questions tagged [react-modal]
Accessible modal dialog component for React.JS
react-modal
267
questions
0
votes
0
answers
8
views
Text Blurring Issue with react-tooltip and react-modal when using opacity/transform animations in Chrome
I am working on a project using two libraries: react-modal and react-tooltip.
Goal:
I want to create a reusable React component that provides a simple modal window, which renders its children.
Problem:...
0
votes
0
answers
8
views
react native modal while the keyboard is getting opening,the background page is getting visible.How to fix this?
Currently,am using react native modal while the keyboard is getting opening,the background page is getting visible.I have tried with keyboardAwareScrollView and aslo keyboardAvoidingView.How to fix ...
0
votes
1
answer
57
views
How do I mock a function in react-modal using Vitest?
I am writing a test for a module that uses react-modal to open a modal. React-modal requires that you set the root element for accessibility reasons.
if (typeof document != "undefined") {
...
0
votes
0
answers
26
views
How to use contentRef of react-modal to change the position of modal?
My modal height can change as content is dynamic and the card above i want to show a modal also changes his position,I want my modal end exactly above that card
0
votes
0
answers
33
views
How to pass 'className' as a props when using styled-components?
I have made a modal component with 'react-modal' and 'styled-components' library. I want this modal component can get another css styles and mix with its default css.
import ReactModal from 'react-...
0
votes
0
answers
23
views
Bootstrap modal works in static webpage, but not in React.js equivalent
I'm building a site from a Bootstrap template that comes with some modal components, specifically in the 'portfolio' section of this template. The modals work fine when my page is entirely front end. ...
0
votes
1
answer
37
views
I have a modal created using the react-modal and I'm trying to stylize it putting an exit button at the top left, half in and half out of the modal
I have the code below and the exitIcon button is the one I'm trying to make half in and half out of the modal. I've tried using z-index in it but it seems to not work properly, I also already changed ...
0
votes
0
answers
67
views
How can I change react-modal lib tabIndex?
<div class="ReactModal__Content ReactModal__Content--after-open layouts_reactModal__RKLdX" tabindex="-1" role="dialog" aria-modal="true">
I use react-...
0
votes
1
answer
321
views
Create a portal modal is not working in React
I want to create a modal using React Portal, so here I have created a showModal container for modal data, a Modal container we can use to control the Modal, and in index.html, I want a wrapper for ...
0
votes
0
answers
47
views
React Modal not closing when used with react leaflet
After rendering the map container inside the modal component, everything works fine. But when we click on one of the zoom in and out buttons and then click on the overlay, the modal does not close on ...
1
vote
1
answer
162
views
Click on overlay for closing the modal not working
I use react-modal in next.js
I can close my modal clicking on the x button, but i want to be able to close it when i press outside of the modal. I searched I found the property ...
1
vote
1
answer
195
views
Container for react-modal content
Our web app is 1280px wide and centered. I am working on adding a modal using the react-modal package. I would like a container above the ReactModal__Content ReactModal__Content--after-open ...
0
votes
1
answer
30
views
Modal inside FlastList React Native
I am creating a Modal inside a flatlist, but when i close the modal, the whole flatlist re-renders. I know this is because the useState of modal. How can I solve this??
I dont know what to do to ...
2
votes
1
answer
512
views
React popover(modal) closes automatically after I click the open button (event listener)
Goal:
I want to implement a popover(modal) in React.
When the user click a button, then the popover is open.
Close the popover when the user clicks outside of the popover.
Logic:
conditionally render ...
1
vote
1
answer
429
views
How do I add modal for a delete popup?
I'm new to react and now I'm trying to make the delete alert as a modal, can anyone tell me where do I put it?
const handleDelete = (id) => {
const confirm = window.confirm("Delete this ...