Skip to main content
Question

Variables based menu controls?

  • February 27, 2024
  • 3 replies
  • 284 views

Sorry if this has been discussed, but my search-fu is not finding any discussions.

I’m trying to build a menu that is controlled by a variable. Navigate To conditions based on the variable work fine, as does using Change To to set an Active state for a button when moving to a page that’s not been visited before. These function as Variant Interactions

Where things are falling down for me is setting the button for the previous page back to it’s default state.

I can’t seem to find a way for the buttons to observe the variable and then make a conditional change back to default when it’d not “their page”

I’ve tried using Delay on the button to trigger this action, but this only works just the one time

Any notions?

This topic has been closed for replies.

Gayani_S
Figmate
  • Community Support
  • February 29, 2024

Hey @Ian13, thank you for reaching out!

Do your states consist of component variants? If so, have you tried checking off Reset component state in the State Management section of the panel? If you need the menu’s state to be reset (back it’s default state)for the previous page. You can set the state management to Reset component state. It’ll reset to original component state, as set on the canvas.

Screenshot 2024-02-29 at 13.47.53

I’d recommend to check our Help Center article: State reset

If this does not solve your issue please share a screenshot of your conditions or share a copy of your file with me if possible. Please invite support-share@figma.com directly as an editor (this won’t affect your billing at all), happy to help further.

Thank you,
Gayani


  • February 29, 2024

Unfortunately reset component state doesn’t seem to be a viable path as I want any other button to reset, not the one I’m clicking on.

Presently the interactions are tied to click events on any given button, but I need it to impact any other button.

The logic is simple, I can get it to work on a delay timer as the trigger. But haven’t been able to find a way to invoke a change from button 1 to button 2 >

I shared the file, since that’s going to be easier. Thanks


Gayani_S
Figmate
  • Community Support
  • March 1, 2024

Got it, I am able to ask internally if the team has any suggestions for better workarounds. Unfortunately, you did not attach the file link, are you possible to send me a link of your copy? Only of course if you don’t mind sharing it in the Forum. Alternatively feel free to DM me.

Thank you in advance!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings