From cf052171d348f1c0183d4bbd60e0a69d1e80d48e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 7 Aug 2024 19:35:47 -0400 Subject: [PATCH] add comment and eslint ignore --- src/app/dim-ui/usePopper.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/dim-ui/usePopper.ts b/src/app/dim-ui/usePopper.ts index de69f2a1f8..32944af420 100644 --- a/src/app/dim-ui/usePopper.ts +++ b/src/app/dim-ui/usePopper.ts @@ -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, ]); }