Skip to content

Sync filters on Users page with query parameters #98

@abhinavpappu

Description

@abhinavpappu

Desired functionality: If you go to /users and add a filter for Graduation Year: 2023, then the URL should update to /users?graduationYear=2023. Similarly, if you navigate directly to the URL /users?graduationYear=2023, then the corresponding filter should automatically be applied. This is to allow easy sharing of specific views of the data.

Note that multiple filters can be applied for the same key, which should translate to multiple query parametes, i.e. /users?school=illinois&school=urbana. This doesn't need to be supported for now, but just mentioning it so that the format is flexible enough to support this in the future (basically we don't want to use an object that looks like { school: "illinois" } at any point in the conversion from filters to query parameters, instead maybe { school: ["illinois"] } or [{ school: "illinois" }] or something similar).

In addition to simple key=value filtering, we also support additional options including Multiple, Exact, and Invert, but these also don't need to be supported for now.

Feel free to add any packages to help with this such as https://www.npmjs.com/package/query-string

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions