0

I'm using FullCalendar in React, and I implemented the resourceRender function in order to add buttons next to each resource. I'm fetching the children of each resource when clicking on an expand button (so initially I don't have any children for any resource), and I added another button in order to go to another page (details page) for each resource.

What I'm trying to do is when I go back from the details page, I want the calendar to be the exact same one before clicking the details button; meaning that the expanded resources will be expanded, and all of the nested children if they were expanded will remain expanded.

Any idea on how to do this?

4
  • 1
    How did you try? I am thinking you can store the expanded state somewhere and use it back to restore the UI. Commented May 12, 2020 at 14:47
  • @AjeetShah I was thinking of using localStorage in order to store the expanded resources, but I did not find a way to expand these resources programmatically in the UI without having to click on expand. Commented May 12, 2020 at 19:58
  • Yes, you will have to click programmatically. I don't know if it is <a> or <button>. You need to get reference of that element and call the click event and for that you might want to give that element a unique id. If I find a way to do it, I will let you know. Commented May 12, 2020 at 20:09
  • 1
    @AjeetShah okay I'll give it a try, thank you! Commented May 12, 2020 at 20:41

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.