You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sprint, you will work on the functionality of the status filter! You will also have to make a few changes to your current statusFilter component. Ethan did a similar sprint last week, so if you need some help you should check it out. Here is what you will need to do:
First, make a few changes!
a. We are only filtering when the user clicks “Apply”. Therefore, we need to make it so that the status selectedFilter array only changes when we click “Apply”
b. e.g. if the user selects “proposed” but exits the filter without clicking “Apply”, WE WON’T FILTER projects by proposed status!
c. Note: I have moved the selectedFilter array outside of the FilterBar component and into the MapViewComponent because this makes it easier to filter by all our 4 filters AND the search input
Now, you can work on the filtering. All your filtering should be done in the MapViewComponent.
a. We want to be able to filter the projects once the Apply button has been selected. This can be done through useEffects which will operate when we change the array that holds the filtered status filter
b Some hints for filtering by status (it is very similar to Julee’s search function and Ethan’s technology filter function):
. i. The function array.filter(x => true) will filter the array, returning a new array with only the filtered items. X is like an item in the array. True has to be a boolean function to check something for x, if it returns true, it will add it to the filtered array.
. ii. Check out the function .includes() – this could be useful
c. The tricky part is mainly seeing how we can filter by search input + technology + status (while also allowing us to add more filtering for other filters). I will leave that to you to think of – but if you do have any questions / need any help PLEASE DM me.
You should also make a clear filter function (to reset the filter) and put it in the X button (we’ll move it once Josh adjusts the design to have a clear button function)
The text was updated successfully, but these errors were encountered:
This sprint, you will work on the functionality of the status filter! You will also have to make a few changes to your current statusFilter component. Ethan did a similar sprint last week, so if you need some help you should check it out. Here is what you will need to do:
a. We are only filtering when the user clicks “Apply”. Therefore, we need to make it so that the status selectedFilter array only changes when we click “Apply”
b. e.g. if the user selects “proposed” but exits the filter without clicking “Apply”, WE WON’T FILTER projects by proposed status!
c. Note: I have moved the selectedFilter array outside of the FilterBar component and into the MapViewComponent because this makes it easier to filter by all our 4 filters AND the search input
a. We want to be able to filter the projects once the Apply button has been selected. This can be done through useEffects which will operate when we change the array that holds the filtered status filter
b Some hints for filtering by status (it is very similar to Julee’s search function and Ethan’s technology filter function):
. i. The function array.filter(x => true) will filter the array, returning a new array with only the filtered items. X is like an item in the array. True has to be a boolean function to check something for x, if it returns true, it will add it to the filtered array.
. ii. Check out the function .includes() – this could be useful
c. The tricky part is mainly seeing how we can filter by search input + technology + status (while also allowing us to add more filtering for other filters). I will leave that to you to think of – but if you do have any questions / need any help PLEASE DM me.
The text was updated successfully, but these errors were encountered: