# Change list visibility with switch component

**URL:** <https://forum.adalo.com/t/change-list-visibility-with-switch-component/8235>\
**Category:** Get Help\
**Created:** [January 21, 2021, 2:26pm UTC](https://forum.adalo.com/t/change-list-visibility-with-switch-component/8235 "2021-01-21T14:26:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thib](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/thib/32/667_2.png) [@thib](https://forum.adalo.com/u/thib)\
**Post date:** [January 21, 2021, 2:26pm UTC](https://forum.adalo.com/t/change-list-visibility-with-switch-component/8235/1 "2021-01-21T14:26:30Z")

</div>

Hello,

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. 🙂

---

<div class="post-metadata">

**Author:** ![Edward](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/edward/32/5822_2.png) [@Edward](https://forum.adalo.com/u/Edward)\
**Post date:** [January 21, 2021, 3:38pm UTC](https://forum.adalo.com/t/change-list-visibility-with-switch-component/8235/2 "2021-01-21T15:38:18Z")

</div>

Hi,

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.

[https://previewer.adalo.com/61fef377-0cd0-47c3-8f43-c41042afb3e7](https://previewer.adalo.com/61fef377-0cd0-47c3-8f43-c41042afb3e7)

---

<div class="post-metadata">

**Author:** ![Edward](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/edward/32/5822_2.png) [@Edward](https://forum.adalo.com/u/Edward)\
**Post date:** [January 21, 2021, 3:59pm UTC](https://forum.adalo.com/t/change-list-visibility-with-switch-component/8235/3 "2021-01-21T15:59:41Z")

</div>

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:

[https://previewer.adalo.com/27fc7141-a38f-4d9d-9fd5-7c470ebfe13e](https://previewer.adalo.com/27fc7141-a38f-4d9d-9fd5-7c470ebfe13e)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [January 31, 2021, 4:00pm UTC](https://forum.adalo.com/t/change-list-visibility-with-switch-component/8235/4 "2021-01-31T16:00:02Z")

</div>

Closed on January 31, 2021, 4:00pm UTC

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