So this works somewhat, OK, where I have my list and once they have branders, then of course I have
my whole list and then once I click on a breakfast button, I only get items whose category is equal
to the breakfast.
But there are two issues with this approach.
First one, we don't have a button and functionality for all, so I can't display all the items on a
second.
Even bigger issues, the fact that we are not in sync with our data.
So let's start with all button and then of course, I'll show you the bigger issue, the fact that we
always need to manually update if there are some changes to our original.
All right.
So first, let's navigate back to App J.S. and Noticiero and a half filter items.
I also would want to set up functionality where if the category is equal to all, then of course I would
just set my menu items back to my default, back to my original items.
All right.
I then simply do it this way where we set up a condition.
And I say if and that category is equal to all than one I would want is a set menu items and then again
pass in the items.
So my original right.
And I can just nicely return from the filter items.
Now, of course, what's missing is in the categories, a button that passes in that string into the
filter items.
So here we could do is copy and paste and we'll just change this value around where instead of filter
items and breakfast or lunch or whatever values they have in there.
Now, of course, I'll just set up all and all safe and beautiful.
We have breakfast.
Somehow we misplay on the breakfast items and then once we click on all, we display the whole list.
So that works somewhat.
OK, where we have a button for breakfast and then we have a button for all.
Now, the bigger problem here is that we're not in sync with our data.
And what that means is that if I keep on adding more items and then they have different categories,
well, I'll always have to manually hop back to the categories and add that button.
And that is not the best approach.
And I'll fix that in the next video.