Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
98 views

React modal update item bug

During the update process, it updates the information of the same id value every time, what could be the problem? for example, it updates the field with id number 3 on every update operation. I am ...
Programmer's user avatar
1 vote
0 answers
366 views

React Modal Window issue - getting closed with Redux Call, whereas it works with Axios Call

Opening a Modal Window, multiple times from same component with some different props. Modal Window opens, then from a Select - onChange event, making a redux call using dispatch(fetchPreferredEmployee(...
Rajesh Gupta's user avatar
1 vote
1 answer
228 views

Is there a way to make reusable modal with action buttons with Redux?

I have a dialog message in a modal that asks the user to save changes if there is an attempt to navigate to another screen without saving. It has 3 buttons (Save, Proceed without Saving, and Close). ...
Oleksandr Fomin's user avatar
1 vote
1 answer
243 views

Delete Modal. React Redux. Cannot read property '_id' of undefined

Trying to delete a transaction for an expense tracker. When the user click on the trash icon, a modal should appear. Instead Cannot read property '_id' of undefined is cast. I'm guessing I need a ...
Toan Lam's user avatar
  • 109
0 votes
0 answers
238 views

How do I use the same modal for add and edit in reactjs

I am noew to redux. I am working on an ecommerce application and I want to use the same modal box for both add and edit of the categories using redux but I dont know how to go about it The code is to ...
samsino's user avatar
  • 17
0 votes
1 answer
44 views

My modal is not toggling properly in React using Redux? Redux, functional component

when trying to add a toggle the modal on my application, the state is messed up where it automatically shows the modal form without anything being clicked to toggle it. The 'initialState' for the ...
wadaygo2's user avatar
1 vote
1 answer
3k views

Using react-redux, what is the best practice to pass a callback function to a generic Component through the redux state?

Here's a simple case, I want to create a generic Modal component with a confirm button. Once the button was clicked, it will fire the onConfirm function we provided via the redux state. And the ...
Wei J. Zheng's user avatar
0 votes
2 answers
2k views

Make a Confirmation Modal using React & Redux

I was making an application in which I need to make a confirmation box to ask the user if he wants to delete the record or not. I want to use the confirmation box globally. Suppose I want to delete a ...
Sumit Ghewade's user avatar
1 vote
1 answer
2k views

How can refresh data in a table using react redux and a modal form?

I'm facing an issue with refreshing data in a table using react/redux and a form. What I need to do here is to fill a modal form, than submit to my backend and then refreshing the table using setState....
Giuseppe Albrizio's user avatar
0 votes
2 answers
4k views

How to open child component modal from parent by using its key in ReactJs

I am creating my blog where I want to edit the each blog respectively on click of it edit button. Now modal is opening for respective id but value is not set with state value. That is ...
Tammy's user avatar
  • 1,132
0 votes
1 answer
932 views

Reactjs: How to perform edit action and open modal according to its respective id

I want to handle Edit/update action on my modal value of my blog. All the actions ADD, EDIT, DELETE are working now Only issue is on click every edit I am getting same blog data of 0th array any ...
Tammy's user avatar
  • 1,132
0 votes
1 answer
446 views

Can rendering too many modals cause a problem?

I am trying to create a performant and large scale react-redux application. The problem is that i have too many buttons that require the same modal to be shown with different content based on which ...
ResonateAlpha's user avatar
0 votes
1 answer
1k views

Open modal component when submit axios post

I have an onSubmit function with an axios post that allows to register a user. I would like to know if it is possible if when the user create his account, at the time of the submission a open modal ...
Nocktis's user avatar
  • 125
3 votes
1 answer
4k views

How do I reset modal props on close

I have a component, DeleteRoute, which is just a wrapper around a Modal. It allows me to delete a "Route" entity. I am using React as well as Redux to maintain data and state. I am struggling with ...
ztorstri's user avatar
  • 389
0 votes
1 answer
2k views

Will the background component unmount when modal is open in react? If not, how to maintain/store states of modal and react component using redux?

Demo ( not working but for file structure) https://codesandbox.io/s/material-demo-bsr06 I need to open a Modal when I clicked something in this URL dashboard/someMails, it should open with dashboard/...
Coder's user avatar
  • 610
1 vote
1 answer
295 views

mdbreact modal applies a class 'modal-open' to body tag even if the modal is not open yet

I am using mdbreact modal in my react application but facing some issue. I try to include the modal component in my page, but the modal is not open yet, inspite of that it is applying a class 'modal-...
Nikita Jajodia's user avatar
0 votes
1 answer
135 views

React Modal makes page goes down

Don't know why when i click to open the modal the main screen goes down as the modal goes on top of it: https://github.com/RodPin/Modal-with-Redux
Rodrigo's user avatar
  • 234
0 votes
1 answer
478 views

Confirm dialog for all http call react-redux

i should develop a confirm dialog callable from all components through react/redux. I have to pass inside redux state 2 callbacks with accept and reject derived from confirm dialog but function are ...
Luca Valsecchi's user avatar
0 votes
1 answer
3k views

Rendering modal on click (user action) react redux

I am rendering modal using react and redux. I've seen thousand of examples of how to create a modal, but none on how to fire it inside another component. I took the same approach to render modals ...
Hector's user avatar
  • 157
1 vote
1 answer
2k views

Conditional rendering in React that causes remounting when toggled

I have been struggling with React recently, trying to understand how to properly control conditionally rendered elements (such as dialogs) that can be displayed by several different things. For ...
Kendall's user avatar
  • 2,172
1 vote
1 answer
809 views

Confirmation modal connecting to redux store using mapStateToProps gives an ERROR

I have a modal component. When the close button of the modal is clicked, I need to show up a confirmation modal. It has yes and no options. This confirmataion component is connected to Redux store. ...
Ravindra Ranwala's user avatar
4 votes
1 answer
7k views

Storing React component in a Redux reducer?

I am creating a common modal React component for my application to display a variety of different things. I would like it to be flexible enough to display both plain HTML and interactive React ...
Corey Larson's user avatar
  • 1,134
0 votes
0 answers
243 views

Test functions passed as props to modal in React Redux

I am looking for a way to test the functions passed as props to a React Bootstrap modal in React Redux, generated in a similar way to here: https://stackoverflow.com/a/35641680/4401847. I need to ...
Gothbag's user avatar
  • 11
1 vote
2 answers
3k views

React confirm modal and redux middleware

I'm new to React and Redux also. I want to remove item from the list so I dispatch an action deleteSelectedItems then I use redux middleware to catch it and show confirm. That looks like below: ...
An Nguyen's user avatar
  • 800
2 votes
3 answers
4k views

React-Redux container throws "mapStateToProps() in Connect(ModalRoot) must return a plain object. Instead received undefined."

I am building a Redux based Model/Dialog trigger based on Dan Abramov's solution to this question: Dan Abramov's solution The error I am getting is "mapStateToProps() in Connect(ModalRoot) must ...
Nathan Horrigan's user avatar