Here is the working example
Sorting and filtering tests are not implemented yet
Using code from the React People Table implement the ability to filter and sort people in the table.
- All the filters and sort params should be saved as URL Search Params, so you could share the link to show exactly what you see.
- Keep search params when navigating within the
Peoplepage (when selecting a person or clicking thePeoplelink). - The sidebar with the filters should appear only when people are loaded.
NameFiltershould update thequerysearch param with the text from the input.- show only people with the
name,motherNameorfatherNamethat match the query case insensitive; - if the input is empty there should not be
queryin the search params.
- show only people with the
CenturyFiltershould allow to choose several centuries or all of them.- add
centuriessearch params usingappendmethodgetAllmethod;
- add
- Implement sorting by
name,sex,bornanddiedby clicking on arrows in ath;- the first click on a column sorts people by the selected field ascending (
a -> zor0 -> 9); - the second click (when people are already sorted ascending by this field) reverses the order of sorting;
- the third click (when people are already sorted in reversed order by this field) disables sorting;
- use
sortsearch param to save sort field; - add
order=desc(short fordescending) if sorted in reversed order; - if sorting is disabled there should not be
sortandordersearch params;
- the first click on a column sorts people by the selected field ascending (
- Install Prettier Extention and use this VSCode settings to enable format on save.
- Implement a solution following the React task guideline.
- Use the React TypeScript cheat sheet.
- Open one more terminal and run tests with
npm testto ensure your solution is correct. - Replace
<your_account>with your Github username in the DEMO LINK and add it to the PR description.