Skip to main content
Shane
February 26, 2021

LAUNCHED: State management for prototypes

  • February 26, 2021
  • 205 replies
  • 21529 views

Just struck a pretty simple use case/scenario where I need the component to reset it’s state when I leave the frame. This has been touched on elsewhere, but this is such a common and key use that I thought I’d put it in it’s own thread.

Scenario:
I’ve got a dropdown menu with three items in it, with each item changing what columns are visible in a table and some other control states. I have three frames, each with a view of the table setup as it should be, and want to use the dropdown items to navigate between the frames - basically faking the table state change. All of this works perfectly, however when I navigate back to a previous table view state, the dropdown component is already in it’s open state - not what I want.

Current workaround: none that I can come up with (other than not using interactive components at all for this, and just using multiple frames for the dropdown open/closed states as I would previously)

Suggestions:

  1. Have a “reset component on leaving this frame” setting for instances of a component on a frame - useful for this situation and others, but needs to be a setting so that components that should keep their state between frames can do so (light/dark toggle maybe? Something like that).
  2. Do it all in a single frame, with the dropdown component changing the the state of the table component - no frame navigation required. Would work nicely for the particular use case I’m working with here, but not sure it would solve all similar situations.
  3. Do both 1 and 2. This solution is my preferred solution 😉 😆

EDIT:
Other threads that relate:

205 replies

Adam_Hay
March 25, 2022

i am finding myself in this very situation with multi-tier navigation. everything works as expected on the initial path, but when returning to the origin page, the specific secondary flyout menu used to first navigate is stuck in an open position, where I would like it to return to its original state. totally agree with the proposed solution of being able to set the origin back to its initial state upon navigating to a new frame.

Johann2
March 29, 2022

Workaround:
State stays persistent even in multiple nested interactive component. You can go very far with this approach.

Only reason I would need frame to frame persistence is to reflect some kind of logic or content change.

Nicholas_Del_Conte
April 5, 2022

+1 this has been going on for ages. It’s a stupid bug and must be fixed. Devs please fix this.

Alex_Harbuzinski
April 6, 2022

+1 As well. My clients think my prototypes are broken since they can’t preview animations multiple times when they get into pages. Please make component resetting come true.

raul_cerda1
April 6, 2022

+1
I need this for my prototypes as soon as possible.

Terry2
April 11, 2022

Same case here

Wolfgang_Hahner
April 13, 2022

+1
I agree, this is hard to explain to clients!

Henry_Harding
April 21, 2022

Bump. I’d really like a way to reset a variant back to it’s original state. I constantly run into this issue with my prototypes that use forms or flyouts. The best solution I’ve found is to close and refresh the page, which is painful to do and is not at all practical for demos and presentation.

paulina.ciastek
April 25, 2022

+1 Same problem here

Richard11
April 26, 2022

Same. I have a screen with a loading bar component that upon 100% completion goes to a results page. When I link back to that screen with the loading bar, it still shows 100% for a split-second before going to the results page again. The components need an original state that is always loaded every time the user navigates back to that frame.