Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[feat] Status Filter Functionality #89

Closed
itsliterallymonique opened this issue Nov 27, 2024 · 0 comments · Fixed by #94
Closed

[feat] Status Filter Functionality #89

itsliterallymonique opened this issue Nov 27, 2024 · 0 comments · Fixed by #94
Assignees
Labels
enhancement New feature or request Sprint 9
Milestone

Comments

@itsliterallymonique
Copy link
Collaborator

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:

  1. 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
  2. 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.
  3. 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)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request Sprint 9
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants