Change list visibility with switch component


I have a newsfeed with “all news” and “specific news”. These “news” elements are all in the same data collection and distinguished by a property “True/false”.

I want to have the switch component on top of the newsfeed. When the switch is turned on, show only the “specific news” and when its off, show “all news”.

What’s the best way to do this? Thanks for your help. :slight_smile:


This is what I come up with. The app is cloneable. The switch is changing the input value. Later on you you can change the input to be 1px by 1px, opacity 0 so users would not see it. There are 2 lists on the screen. 1 list without a filter and visible only if input value is All. The other list only news. Visible if input value is News. Hope that helps.


If the toggle doesn’t work for you, you can replace that with 4 texts. News, News(colored) All, All(colored) and change the visibility based on which one is clicked. Here is a sample that I made before for another question:

List filtering hack


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.