Skip to content

Commit

Permalink
add comment and eslint ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
liamdebeasi committed Aug 7, 2024
1 parent 96a23fa commit cf05217
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/dim-ui/usePopper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ export function usePopper(
offset,
fixed,
padding,

/**
* Doing ...deps allows us to pass dependencies from the components that rely on
* usePopper. Certain popovers are only shown when specific conditions are met,
* so by making those conditions dependencies we can position the popover
* correctly once the popover is actually shown.
*/
// eslint-disable-next-line react-hooks/exhaustive-deps
...deps,
]);
}

0 comments on commit cf05217

Please sign in to comment.