Skip to main content
Question

Tap to change component back to default state?


I have a graph where the data displayed can be changed by tapping Day, Month, or Year, and I have the default view as Month. I’m able to tap Day and Year to change to those respective views, however for some reason I’m not able to tap Month to return to the Month view. I have Month set to change to the Month view on tap, and I’m not sure what I’m doing wrong.

7 replies

Vishal_Ramawat

Can you share the interactions for each Day, Month and Year buttons?


They’re each set to “Change to” the respective variant of the graph and button component on tap. Change to Day and Change to Year both correctly change the green highlight to Day or Year and change the graph. I have Month set to Change to the Month variant, but it doesn’t appear as clickable on the prototype.


Vishal_Ramawat

Is the graph Variant name same as in the interaction. They are case sensitive, so if you write month instead of Month, it wont work. It might be difficult without the screenshot, or recording of the issue, as there could be an oversight. Please see if its possible for you to share any visuals.



The graph and button variants are just Day, Month, and Year.


Vishal_Ramawat

I tried recreating the tabs and its working fine with me.


Is your graph part of the tabs or is separate component?


My graphs are part of the tabs as one component. Could this be causing the issue? (i.e. they should be separate and I should be using a conditional statement to change the graph upon changing the tabs).


Vishal_Ramawat

Shouldn’t be an issue.
Working fine for me. May be there is a minute error somewhere. May be you can share a Figma file by creating a new one and copying just this flow would help.


Reply


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