Closed joelmackenz closed 3 years ago
There seems to be an issue with returning more than one dialog — only one is being created and overwritten, when I want map() to handle creating one separate dialog for every button
Actually, I think I've got it -- the handleFeedbackOpenClose is probably opening all the dialogs at once, and we are seeing only the newest one above the rest. That function needs to open one dialog specifically. Each needs to have its own reference for "open".
I'm trying to add feedbackHistoryDialog.id to an object of ids in the state of PastInterviews when the dialog is created in the map(), and then check if those objects have a true/false boolean within them when the button is pressed, to determine which dialog should be opened. I'm going in circles with this a bit.
I have updated the code to save the id number and a boolean value for open in PastInterviews.js. I'd still love any feedback on this so far, in case I missed anything.
This adds a dialog to show the details of past interviews, when pressing on Dashboard > Detailed Feedback > View. All View buttons are showing the same hard-coded information (which I expect it to do so far), but the date, which I want to come from rows.map in PastInterviews.js, will only render the newest date added to the hard-coded pastInterviews in Dashboard.
So in PastInterviews.js, the dates are being read and displayed properly from Dashboard. But for this new component, FeedbackHistoryDialog, the dates are not being displayed properly. Could anyone give me a hand with this?