Skip to content

Commit

Permalink
lint: ignore hooks deps, add todos to fix them later
Browse files Browse the repository at this point in the history
  • Loading branch information
g-saracca committed Nov 15, 2024
1 parent 05b9bad commit 5bf0175
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,14 @@ export function useFileSelection(

useEffect(() => {
setFileSelection(updateFileSelection())
// TODO: Not a priority as the one for inifinite scroll is used but the eslint disable should be removed and the dependency should be added
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentPageSelectedRowModel])

useEffect(() => {
setCurrentPageRowSelection(computeCurrentPageRowSelection())
// TODO: Not a priority as the one for inifinite scroll is used but the eslint disable should be removed and the dependency should be added
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [paginationInfo])

return {
Expand Down
3 changes: 3 additions & 0 deletions src/sections/dataset/dataset-files/useFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export function useFiles(
console.error('There was an error getting the files')
setIsLoading(false)
})

// TODO: Not a priority as the one for inifinite scroll is used but the eslint disable should be removed and the dependency should be added
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
filesRepository,
datasetPersistentId,
Expand Down
8 changes: 8 additions & 0 deletions src/sections/shared/pagination/PaginationControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export function PaginationControls({

useEffect(() => {
onPaginationInfoChange(paginationInfo)
// TODO: Not a priority as not used for inifinite scroll is used but the eslint disable should be removed and the dependency should be added
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [paginationInfo.pageSize])

useEffect(() => {
Expand All @@ -52,10 +54,14 @@ export function PaginationControls({
setSearchParams(searchParams)
}
}
// TODO: Not a priority as not used for inifinite scroll is used but the eslint disable should be removed and the dependency should be added
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [paginationInfo.page])

useEffect(() => {
setPaginationInfo(paginationInfo.withTotal(initialPaginationInfo.totalItems))
// TODO: Not a priority as not used for inifinite scroll is used but the eslint disable should be removed and the dependency should be added
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [initialPaginationInfo.totalItems])

useEffect(() => {
Expand All @@ -67,6 +73,8 @@ export function PaginationControls({
goToPage(page)
}
}
// TODO: Not a priority as not used for inifinite scroll is used but the eslint disable should be removed and the dependency should be added
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchParams])

if (paginationInfo.totalPages < MINIMUM_NUMBER_OF_PAGES_TO_DISPLAY_PAGINATION) {
Expand Down

0 comments on commit 5bf0175

Please sign in to comment.