1 00:00:00,150 --> 00:00:08,160 So this works somewhat, OK, where I have my list and once they have branders, then of course I have 2 00:00:08,160 --> 00:00:15,660 my whole list and then once I click on a breakfast button, I only get items whose category is equal 3 00:00:15,900 --> 00:00:17,000 to the breakfast. 4 00:00:17,550 --> 00:00:21,570 But there are two issues with this approach. 5 00:00:22,050 --> 00:00:28,950 First one, we don't have a button and functionality for all, so I can't display all the items on a 6 00:00:28,950 --> 00:00:29,370 second. 7 00:00:29,670 --> 00:00:33,970 Even bigger issues, the fact that we are not in sync with our data. 8 00:00:34,440 --> 00:00:41,400 So let's start with all button and then of course, I'll show you the bigger issue, the fact that we 9 00:00:41,400 --> 00:00:47,610 always need to manually update if there are some changes to our original. 10 00:00:47,670 --> 00:00:48,110 All right. 11 00:00:48,420 --> 00:00:54,600 So first, let's navigate back to App J.S. and Noticiero and a half filter items. 12 00:00:54,960 --> 00:01:02,610 I also would want to set up functionality where if the category is equal to all, then of course I would 13 00:01:02,610 --> 00:01:08,260 just set my menu items back to my default, back to my original items. 14 00:01:08,280 --> 00:01:08,630 All right. 15 00:01:08,910 --> 00:01:12,990 I then simply do it this way where we set up a condition. 16 00:01:13,870 --> 00:01:23,890 And I say if and that category is equal to all than one I would want is a set menu items and then again 17 00:01:23,890 --> 00:01:24,990 pass in the items. 18 00:01:25,360 --> 00:01:27,030 So my original right. 19 00:01:27,370 --> 00:01:31,360 And I can just nicely return from the filter items. 20 00:01:31,630 --> 00:01:39,040 Now, of course, what's missing is in the categories, a button that passes in that string into the 21 00:01:39,040 --> 00:01:39,700 filter items. 22 00:01:39,940 --> 00:01:47,080 So here we could do is copy and paste and we'll just change this value around where instead of filter 23 00:01:47,080 --> 00:01:50,980 items and breakfast or lunch or whatever values they have in there. 24 00:01:51,370 --> 00:01:55,570 Now, of course, I'll just set up all and all safe and beautiful. 25 00:01:55,840 --> 00:01:56,920 We have breakfast. 26 00:01:56,920 --> 00:02:02,310 Somehow we misplay on the breakfast items and then once we click on all, we display the whole list. 27 00:02:02,590 --> 00:02:03,910 So that works somewhat. 28 00:02:03,910 --> 00:02:10,580 OK, where we have a button for breakfast and then we have a button for all. 29 00:02:10,960 --> 00:02:16,810 Now, the bigger problem here is that we're not in sync with our data. 30 00:02:17,350 --> 00:02:24,180 And what that means is that if I keep on adding more items and then they have different categories, 31 00:02:24,550 --> 00:02:30,510 well, I'll always have to manually hop back to the categories and add that button. 32 00:02:30,520 --> 00:02:32,320 And that is not the best approach. 33 00:02:32,590 --> 00:02:34,690 And I'll fix that in the next video.