Skip to content

Commit 2902e30

Browse files
fix(dashboard): Fix position of bulk actions when in sheet
1 parent c3f1d1b commit 2902e30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/dashboard/src/lib/hooks/use-floating-bulk-actions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export function useFloatingBulkActions({
3232
}
3333

3434
const updatePosition = () => {
35-
const container = document.querySelector(containerSelector)?.closest('div') as HTMLElement;
35+
// Find the container by searching upwards from the current component
36+
const currentElement = document.activeElement || document.body;
37+
const container = currentElement.closest(containerSelector) as HTMLElement;
3638
if (!container) return;
3739

3840
const containerRect = container.getBoundingClientRect();

0 commit comments

Comments
 (0)