Skip to content

LabPetro/react_people-table-advanced

 
 

Repository files navigation

React People Table (Advanced) - Filterging and Sorting

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.

  1. 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.
  2. Keep search params when navigating within the People page (when selecting a person or clicking the People link).
  3. The sidebar with the filters should appear only when people are loaded.
  4. NameFilter should update the query search param with the text from the input.
    • show only people with the name, motherName or fatherName that match the query case insensitive;
    • if the input is empty there should not be query in the search params.
  5. CenturyFilter should allow to choose several centuries or all of them.
    • add centuries search params using append method getAll method;
  6. Implement sorting by name, sex, born and died by clicking on arrows in a th;
    • the first click on a column sorts people by the selected field ascending (a -> z or 0 -> 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 for descending) if sorted in reversed order;
    • if sorting is disabled there should not be sort and order search params;

Instructions

  • 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.9%
  • TypeScript 40.8%
  • HTML 1.9%
  • SCSS 1.4%