Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Always render an intercepted route in a modal even if navigating to the url directly in next.js

I am using the Parellel routes and route Interception to create a user experience that opens a form (the /new route) in a modal for the user to create their new thing. The route is /posts/new. However,...
Jordan's user avatar
  • 2,513
0 votes
0 answers
29 views

Shadcn Dialog X/close button not closing the Dialog

I have used the shadcn Dialog component in my react application as below: Component: . . . import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogClose, } from '@/...
vijay s's user avatar
  • 387
0 votes
0 answers
20 views

Issue with MUI 6.1.5 <Dialog> Styling not applying

Good day to all, I seem to be having an issue with the styling of Dialog props from mui v6.1.5. I am trying to add some styling to the padding and margins, width to different Dialog Components but it ...
Razvan Bobonea's user avatar
0 votes
1 answer
58 views

Overflow outside React portal dialog

I defined a base dialog for my dialogs using React createPortal and I am using react-select for my forms. In normal elements it works fine, but when I use it in a portal the options overflow result in ...
Emaborsa's user avatar
  • 2,810
0 votes
1 answer
30 views

React not rendering alert when confirming comment deletion in modal

Context: interactive comment section CRUD app When deleting a comment, the user clicks a Delete button which opens a modal to ask them to confirm the deletion. That part (the modal opening/closing and ...
awelie_go's user avatar
0 votes
0 answers
31 views

positioning <dialogs> to the right not center

I have a dialog and I want it to be on the right side like a sidebar, but other parts of the page should not be accessible. So I am using a dialog but it's centered and I need it to be on the right ...
Nenepo's user avatar
  • 1
0 votes
1 answer
69 views

Create a dynamic react component using portal and promise

Call a modal or drawer from anywhere in my react app using simple a function. I have made this work by using the root.render, but the problem with root.render they cannot found any of my previous ...
Andre's user avatar
  • 1
0 votes
2 answers
102 views

Pressing Escape key on modal triggers the escape event on the parent component

This is the main page. "use client"; import React, { useEffect, useState } from "react"; import TestModal from "./TestModal"; const App = () => { const [isOpen, ...
Vikas Jyani's user avatar
0 votes
0 answers
67 views

How to make the background of a Modal in React Native as white blurred?

I am using the TransitionPresets.ModalPresentationIOS to launch a Modal screen. I would like to make the top background of the Modal screen to a blurred white colour. I can't use Modal component in ...
Alexander's user avatar
  • 480
0 votes
2 answers
59 views

How to have the same transparency mask on every ant design modal?

{filteredBookings.map((booking, index) => ( <Modal key={index} // Make sure to provide a unique key open={detailModalVisible} ...
CChickii's user avatar
0 votes
0 answers
23 views

Hide child component from parent with transition

I created this modal component: interface ModalProps extends PropsWithChildren { /***/ onClose: () => void; } const Modal: FC<ModalProps> = ({ /***/ onClose, children }) => { ...
ED SA's user avatar
  • 13
0 votes
1 answer
174 views

Modal with React JS Best practice

I would like to make a modal window where the user can choose a team of 3 characters. So far I've been using a state in the parent component like const [showModal, toggleModal] = useState(false); But ...
Akihiro's user avatar
  • 67
0 votes
1 answer
37 views

Table data not getting updated until i refresh the page

The issue I'm encountering is that when I add data to the database through a modal component, the new data doesn't immediately appear in the table. It only shows up after I refresh the page. I ...
Shivani Negi's user avatar
0 votes
0 answers
163 views

React-Native: SafeAreaView not working in Modal

Following is done for a mobile app on android in react native. I want to display a text in the center of the screen, however even with a SafeAreaView it is not in the center, it is still a bit off, ...
bananajoey88's user avatar
0 votes
1 answer
39 views

Video isn't stopping even when I open modal

I have a video tag in which I am playing some video and passing that video to my modal as a prop. When I open the modal, the video still plays in the background. I want it to be stopped when I open ...
basit khan's user avatar
0 votes
2 answers
231 views

Data in modal is not updating in React JS

I creating clone of frontend of this website, everything is going smoothly but when I reached at cart section I find there is a lot of work. In short, I just create a Add to Cart button for my website ...
Sheeraz Ahmed's user avatar
0 votes
1 answer
57 views

I want to disable the Formik validation when loading a modal

I am using Formik and Yup in my React Typescript project , I have a modal that will save a new value , I added Formik Validation to the Fields in my modal but when I click the add button in my page to ...
Edi-nano's user avatar
0 votes
2 answers
48 views

How to open a modal in a function

I want to open a modal by click a button which is supposed to export some datas in an excel file. So there is my code but the modal is still close. I'm new in react, did I do something wrong ? Thank's ...
Alexandre S.'s user avatar
0 votes
0 answers
333 views

How to integrate Modal from Laravel Breeze React starter kit?

This was the original code from the Modal Component that came along with the Laravel Breeze React starter kit, but I can't see to get the modal to show up - is this code only for a dark background of ...
jlimsy's user avatar
  • 3
0 votes
1 answer
115 views

MUI Base Modal Backdrop Not Registering Clicks

I am attempt to implement a Modal using MUI Base Modal component and scss modules for styling: import { Modal as BaseModal, ModalProps as BaseModalProps } from '@mui/base'; const Backdrop = () => &...
Aaron Parisi's user avatar
0 votes
0 answers
18 views

State not updating in Atlassian Modal using hooks

I'd like to show a flag (a separate component) on clicking Delete button. But state doesn't get updated, so flag isn't showing up. What might be the cause? export const Modal: FC<Props> = ({ ...
isosceles triangle's user avatar
0 votes
1 answer
186 views

Does React modal window always causes parent's re-render?

I have developed a modal window with React several times and have always faced the problem of re-rendering the parent component. For example, I am currently using MUI and react-transition-group to ...
Curry's user avatar
  • 1
0 votes
0 answers
23 views

How to prevent react native modal from moving up when keyboard opens in ios?

I tried to stabilise the modal, but when i touch the screen the modal goes upward and breaking down the style. <Modal modalVisible={props.visibility} onClose={() => props.onclose()} ...
Rinshad's user avatar
0 votes
3 answers
138 views

How to make the position of a modal window static when zooming or resizing the screen

The site (written in React, using Typescript and Tailwind) has a modal window. Modal is implemented using the "react-modal" library https://reactcommunity.org/react-modal/ . With standard ...
Paul's user avatar
  • 157
0 votes
0 answers
19 views

Modals in React applications

I would like to ask you how you create and manage modals in your React applications. I saw the solution when modals are handled using Redux.For example you dispatch the modal key and props into the ...
user avatar
0 votes
0 answers
22 views

Unable to close modal: setter function used to change variable state which closes modal never executes

Right now I'm working on a menu page for a website on the client side using Next.js. When the menu for a restaurant renders, each list item represents an item on the menu. Each menu item has its own ...
fwklaus's user avatar
0 votes
0 answers
23 views

Using input outside Modal's container

I'm currently working with a modal that has a specific container. I also have an input component that is located outside of the modal. My goal is to be able to use (or interact with) this input ...
FeLixVo's user avatar
0 votes
0 answers
109 views

How to Ensure Modal Close Animation Plays on ESC Key Press in React with Framer Motion?

I'm using Framer Motion with React to animate a modal component's entrance and exit. The modal currently closes as expected when clicking outside of it or using a close button, with the exit ...
Sime Saric's user avatar
0 votes
0 answers
1k views

Headless UI modal (dialog component) how do I close when clicking on children?

How do I close a modal window by clicking on any child link? import { Dialog } from "@headlessui/react" const [modalIsOpen, setModalIsOpen] = useState<boolean>(false) <Dialog open=...
Mikhail Shchukin's user avatar
0 votes
1 answer
657 views

React modal dialog re-renders parent component - how to approach this

I have a parent component with reactive vars that are populated with data from a Mongo collection. The child modal dialog modifies this information, causing a re-render of the parent component — and ...
poetsmeniet's user avatar
0 votes
2 answers
468 views

How do i effectively overlap modals in nexjts/react

Basically I want to create 3 modals stacked on top of one another, like the image below. Clicking on the Create Ecosytem will open another shadcn Dialog like 2nd image below The problem I am facing ...
krishnaacharyaa's user avatar
0 votes
2 answers
71 views

How to open login modal using a button?

This is my login modal: "use client"; import Link from "next/link"; import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; import { Card, ...
Evan Ethans's user avatar
1 vote
0 answers
38 views

How to close current Dialog before opening another one?

This is my Login modal: "use client"; import Link from "next/link"; import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; import { Card, ...
Evan Ethans's user avatar
0 votes
0 answers
352 views

Radix UI modal getting called multiple times based on number of items. How should we call it only once

import { useState } from 'react' import { useSelector, useDispatch } from 'react-redux' import { TaskData, setTaskList } from '@/store/tasks' import { RootState } from '@/store/rootReducer' // ...
vini's user avatar
  • 4,726
1 vote
0 answers
91 views

How to show a modal from inside a MUI Menuitem

I am trying to keep all the modal opening & closing logic inside the Menuitem component, as otherwise I have to write that login separately in multiple files wherever I am using this menuItem, &...
Abhishek Mohanty's user avatar
0 votes
2 answers
163 views

How to close bootstrap 5 modal with react

I am using bootstrap 5 with react in my project. I did not install it but using cdn links to use bootstrap element in the dom. I am using bootstrap modal to update data. After the update I want to ...
Hasan Zubairi's user avatar
0 votes
0 answers
224 views

Modal taking click priority over Reactour component in react project

Problem: I have a React application where I'm using the Reactour library (https://github.com/elrumordelaluz/reactour) to provide a guided tour for users. However, I'm facing an issue where a modal ...
Bravewart's user avatar
1 vote
1 answer
71 views

How do I display an array object in map onClick for modal?

I'm fairly new to React and I'm using NextJS. I have an array with role objects. I'm mapping over the array to display role name and description. What I'm trying to do is display the other array ...
liitepiixels's user avatar
-1 votes
1 answer
47 views

State does not change on Click

Here is my component code: import React from "react"; import { useState } from "react"; import { Text, SvgContainer, Svg, Flex } from "../lib/styles"; import Modal from &...
Michele Staffiere's user avatar
0 votes
0 answers
419 views

how to open login modal on try to access protected routes in next js?

In my website, I use login form inside a modal instead of a login page. my question is how to open this login modal if a user try to access a protected route or even try to do some actions that need ...
amir_70's user avatar
  • 930
0 votes
0 answers
109 views

Close modal window on first click

I have a modal window on my website, which is implemented using the library https://www.npmjs.com/package/react-modal. Inside the modal window there is a Select (https://www.radix-ui.com/primitives/...
Paul's user avatar
  • 157
0 votes
0 answers
189 views

Controlling modal using custom hook does not work properly

I want to render Modal.tsx in MyInfoPage.tsx(or anywhere I want to show modal). So, I created simple custom hook useModal.ts to control isOpenModal. But, I encountered some rendering problem. When I ...
ki0's user avatar
  • 31
0 votes
0 answers
28 views

In a list of items when clicked on location icon from the list, only related address modal will open using reactjs

In React, I have a list of items and each item of the list have a location icon link that opens a modal and need to show corresponding address. But for me when I click on the particular location link, ...
sarika tr's user avatar
0 votes
1 answer
283 views

antd Form inside modal does not submit in reactjs

I am trying to submit a form inside a modal form but the form does not submit and does not show any errors. I have two forms in component. when the user click on the button it opens upd the modal so ...
etranz's user avatar
  • 1,253
0 votes
0 answers
87 views

State for open / close a modal window not working properly in reactjs

I want to open a modal window when I click on a button. You can find the complete code below. When I click the button, the handleClickOpen function is correctly triggered (the debug console prints the ...
Modou MacLeod's user avatar
0 votes
1 answer
74 views

I'd like to have a button for Modal form on React-Select NoOptionsMessage

So, I have a searchable Select, and my goal is to let users add new item if and only no options left. That's why I wanted the button to appear on NoOptionsMessage. const NoOptionsMessage = (props) =&...
Y.G.'s user avatar
  • 3
0 votes
1 answer
32 views

Maintaining State of the same component

I have a question on maintaining a state for entire component. (Let's consider I have one Modal component which take list and display it) I have one Modal component. This component includes list with ...
vidhi's user avatar
  • 23
0 votes
1 answer
427 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 ...
Sougata Mukherjee's user avatar
3 votes
1 answer
7k views

Next JS parallel routes don't work, getting 404

I'm trying to setup a basic Modal using parallel routes in Next 13 (app directory). Here is my file structure: app ├── @create_recipe │ ├── default.jsx │ ├── page.jsx ├── layout.jsx ├── page.jsx ├─...
Marc Fletcher's user avatar
0 votes
2 answers
82 views

How do I create a modal in React which corresponds to the element a user clicked on?

I'm new to React, but I'm trying to create the functionality where a user can click on any one of the listed profile cards and then display a modal highlighting information about the respective card ...
jrdaz14's user avatar
  • 57

1
2 3 4 5
14