Fixed pagination
This commit is contained in:
parent
47a38c45b2
commit
01b12d7e9d
@ -227,12 +227,11 @@ const AllTaskTableTracker = ({ filteredAllTasks, projects, loader }) => {
|
||||
|
||||
useEffect(() => {
|
||||
setItems(filteredAllTasks);
|
||||
const endOffset = itemOffset + itemsPerPage;
|
||||
setCurrentItems(filteredAllTasks.slice(itemOffset, endOffset));
|
||||
setPageCount(Math.ceil(filteredAllTasks.length / itemsPerPage));
|
||||
}, [filteredAllTasks]);
|
||||
|
||||
// Баг с отрисовкой массив currentItems пустой
|
||||
console.log(currentItems);
|
||||
console.log(items);
|
||||
|
||||
useEffect(() => {
|
||||
const endOffset = itemOffset + itemsPerPage;
|
||||
setCurrentItems(items.slice(itemOffset, endOffset));
|
||||
|
Loading…
Reference in New Issue
Block a user