Questions tagged [react-modal]

Accessible modal dialog component for React.JS

260 questions
1
vote
1 answer

How to revalidate data on react-modal close with SWR?

I am trying to revalidate the data on react-modal close using SWR in a NextJS project. I am using the SWR hook like so. const { data, error, isValidating } = useSWR( process.env.NEXT_PUBLIC_APP_URL + `/api/users`, fetcher,{ …
wick3d
  • 1,164
  • 14
  • 41
1
vote
3 answers

react get data and render it in a modal

I'm trying to get data of a table to modal, I got a table and all data are populated just fine, I got a button next to each row where I will like that when I click the button I display all data from the selected row. I got to manage to get the data…
1
vote
1 answer

How to make react-modal scrollable?

Im trying to make my modal (react-modal node package) scrollable (There is an img inside) here is my code: content: { position: 'absolute', backgroundColor: '#FFF', padding: '15px', zIndex: '1000', width: '90%', …
1
vote
1 answer

Dynamically rendering images into modal form mapped array of images

Im working on a project and only started recently with React.So far i made card component that is dynamically rendering data from js-file with a mapped function.One of the data being rendered are (stored in array) images where im displaying the…
Ivana
  • 13
  • 4
1
vote
1 answer

React Native built-in Modal is not visible while coming back to screen

I'm confused in this code little bit, I've two screens, MainScreen and FeedScreen inside NativeStackNavigator, where initialScreenName(screen which will be routed/render first) is MainScreen. I've a modal nested inside MainScreen , and inside modal…
1
vote
1 answer

Error: Invalid hook call - when calling a Modal component

When I try to call the Modal component I'm getting this error - Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: You might have mismatching versions…
1
vote
1 answer

how to display arrayof object data in table format using react js

i have two arrays of objects fetch1= [{ "A": 10 "X": mac }, { "A": 20 "X": Hp }] fetch2=[{ "B": 30 "Y": windows }, { "B":40 "Y": macfee }] Output should be like table A B 10 30 20 40 First "A" column in…
Raghu
  • 51
  • 2
1
vote
2 answers

React - call parent method in child component after passing it

I am trying to create a modal component in which i pass the content of the given modal as a child. < GGModal buttonLabel="Login" content={
1
vote
1 answer

Closing of modal while typing any value in it?

I want to implement update functionality in react. What I created is that I have an Update button, when it is clicked, a modal pops up with an input field to enter the updated value. But as soon as I type a single character, it closes and opens…
MagnusEffect
  • 3,363
  • 1
  • 16
  • 41
1
vote
1 answer

Errors getting react-modal in my React Component

Sorry, React developer newbie. I am trying to use react-modal in my React Component based on the example here. I am getting a few errors I cannot figure out. import React, {useState} from 'react'; import { Card, Button, CardImg, CardTitle,…
Randy
  • 1,137
  • 16
  • 49
1
vote
0 answers

Make react select behave like color input in react modal

I have a react modal in which there is an color html input and other is react select. The react modal has overflow auto css properties. Now, if I open color input it opens without triggering the overflow property of react modal. How to make react…
Arsh Doda
  • 294
  • 4
  • 14
1
vote
0 answers

Ways to stop re-rendering when a state is changed ? (React Native)

Let me summarize a lil bit, what I'm trying to do is when the news is clicked, a modal (in this case I used a library: react-native-modalize https://github.com/jeremybarbet/react-native-modalize) is presented with the respective details of the…
1
vote
0 answers

How to create react multi-step modal form with react hook

I want to create a multi-step modal form, with this modal when a user clicks a button to get started, a modal pops up asking if he/she has an account. If the user clicks "No", no account exist another modal pop that will direct the user to signup,…
techstack
  • 1,367
  • 4
  • 30
  • 61
1
vote
1 answer

Modal for fullsize image with gatsby-image - limit height and width

What I want to achive I am using gatsby and want to design an image gallery. Clicking on one of the images shall open a modal, which: (1) is showing the image in maximum possible size, so that it still fits into the screen and (2) is centered in the…
1
vote
3 answers

how can i open a modal from other component in react js functional component react-modal

newbie in react here may I request for your assistance on below? wont able to open modal component from other function component can i get an e.g in which one component have modal and from other component we can open that modal in react js with…
nilemandal
  • 30
  • 1
  • 7