fixed-pages #2
@ -227,12 +227,11 @@ const AllTaskTableTracker = ({ filteredAllTasks, projects, loader }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setItems(filteredAllTasks);
|
setItems(filteredAllTasks);
|
||||||
|
const endOffset = itemOffset + itemsPerPage;
|
||||||
|
setCurrentItems(filteredAllTasks.slice(itemOffset, endOffset));
|
||||||
|
setPageCount(Math.ceil(filteredAllTasks.length / itemsPerPage));
|
||||||
}, [filteredAllTasks]);
|
}, [filteredAllTasks]);
|
||||||
|
|
||||||
// Баг с отрисовкой массив currentItems пустой
|
|
||||||
console.log(currentItems);
|
|
||||||
console.log(items);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const endOffset = itemOffset + itemsPerPage;
|
const endOffset = itemOffset + itemsPerPage;
|
||||||
setCurrentItems(items.slice(itemOffset, endOffset));
|
setCurrentItems(items.slice(itemOffset, endOffset));
|
||||||
|
Loading…
Reference in New Issue
Block a user