Beautiful job, and I'm next, I would want to work on the company's filter, and that one is going
to be extremely similar to our sort one, because if you remember in a sort we use select and we hardcoded
those values.
So the difference is going to be in this case, that, of course, will iterate over our companies and
then just display these options dynamically.
But everything else is going to be exactly the same.
Meaning, of course, there's going to be different function of the filters, but the idea is exactly
the same.
Where we have select, there's going to be name that is going to be a class name and all that.
The difference is that data will be added dynamically.
So I'll close the sort and then in the filters are one to navigate to the end of categories.
Let's set up our comments and say companies and I love companies.
And of companies and then let's go with our Dave, the class A form, control and line I there.
Let's go with Harring five.
Company, company, and let's set up our select select over here, and then for Select, we need a name
which again needs to match to our filter state value.
And Mike, is that his company?
And I know that I keep on repeating this every time, but it is extremely important if this name will
match to whatever you have in the state.
And of course, when you're set up the update filters, of course, nothing is going to happen because
this is how we set it up dynamically.
And of course, we access that because it is in the name brand.
Furedi actually don't need anything here.
And then since I would want this to be a controlled input, I'm going to go with value is equal to a
company so much that value and also right away on change is equal to my update filters.
And then lastly, I would want to add a little bit of styling, so say here company class as well.
Now, instead of the select, this is where we would want to iterate over companies, companies, and
then we're going with a method.
And then as far as the return, we're going to go with a option.
Now, again, in order to make the shorter, I'm just going to say C, which means that every item will
be represented as a C, and I'm just going to go with a return and an option.
So we're returning option element then for the key.
I'll use my index and then for a value I'll use the C so the company and then inside of this option
I would also want to display my company.
So whatever value I have here, that's why we have select, we have all the companies and we don't actually
have to change anything in the filters here.
So this is going to be exactly the same like we had with a input.
So now if I get the bigger screen, I open up again my components.
I have my filters noticed by default, company is equal to all, but as I change my select value notice
the value also changes in the state that should do it.
Now, of course, we can proceed and display our colors.