fixed-pages #2

Merged
MaxOvs19 merged 8 commits from fixed-pages into main 2023-12-11 15:06:36 +03:00
Showing only changes of commit 01b12d7e9d - Show all commits

View File

@ -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));