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
People
page (when selecting a person or clicking thePeople
link). - The sidebar with the filters should appear only when people are loaded.
NameFilter
should update thequery
search param with the text from the input.- show only people with the
name
,motherName
orfatherName
that match the query case insensitive; - if the input is empty there should not be
query
in the search params.
- show only people with the
CenturyFilter
should allow to choose several centuries or all of them.- add
centuries
search params usingappend
methodgetAll
method;
- add
- Implement sorting by
name
,sex
,born
anddied
by clicking on arrows in ath
;- the first click on a column sorts people by the selected field ascending (
a -> z
or0 -> 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
sort
search param to save sort field; - add
order=desc
(short fordescending
) if sorted in reversed order; - if sorting is disabled there should not be
sort
andorder
search 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 test
to ensure your solution is correct. - Replace
<your_account>
with your Github username in the DEMO LINK and add it to the PR description.