Skip to content

Commit

Permalink
Disable eslint rule for exhaustive-deps in AttachmentCarousel
Browse files Browse the repository at this point in the history
  • Loading branch information
kidroca committed May 7, 2024
1 parent eed77be commit 3089399
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Attachments/AttachmentCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function AttachmentCarousel({report, reportActions, parentReportActions, source,

scrollRef.current.scrollToIndex({index: page, animated: false});
// The hook is not supposed to run on page change, so we keep the page out of the dependencies
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [cellWidth]);

/** Updates the page state when the user navigates between attachments */
Expand Down

0 comments on commit 3089399

Please sign in to comment.