Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Filter resources by location #49

Open
RossellaFer opened this issue Oct 14, 2021 · 2 comments
Open

Filter resources by location #49

RossellaFer opened this issue Oct 14, 2021 · 2 comments
Assignees
Labels
frontend Issue related to using frontend technologies

Comments

@RossellaFer
Copy link
Contributor

I would like to implement a select that allows the user to filter the cards by location. The filter needs to be applied to both the table and the cards view.

I am thinking about introducing state to the application, so that the Filter component can pass the selected location to the Resources and TableView components. Is this the right approach @princiya @sunithapatel?

@sunithapatel sunithapatel added the frontend Issue related to using frontend technologies label Oct 15, 2021
@sunithapatel
Copy link
Contributor

Sounds right to me!
I also wonder if you should consider having another function to return the resources (which right now is in json but could come from a call to an API instead) and this function could take the filter as a parameter. Then the Resources and TableView components could use that function to display the data instead of using the json directly.
Hope that made sense!

@princiya
Copy link
Contributor

@RossellaFer regarding:

Is this the right approach

yes, introduce state into the application 👍

I also wonder if you should consider having another function to return the resources (which right now is in json but could come from a call to an API instead)

this can be an issue by itself, when someone wants to extend the current scope to include data coming from both json and other API. the PR corresponding to this issue can only look into having state management.

let me know if you have other questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issue related to using frontend technologies
Projects
None yet
Development

No branches or pull requests

3 participants