Skip to content

ProgrammingHero1/search-sort-pagination-final

Repository files navigation

Corrections -01

When you do search , you have send skip value 0 to server , otherwise searching may not work perfectly from 1-last pages

const handleSearch = (e) => {
  setSearchText(e.target.value);
  //Set Current Page to 0 . It will make skip = 0
  setCurrentPage(0);
};

Advice - 01

Add a Loading State to show the Loading on Page change

Advice - 02

you can also use Axios to send the params in such a easy way

const res = await axios.get("/apps", {
  params: { limit, skip, sortField, sortOrder, search },
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published