From 3cb15177ccaab7c6451b42f80363694691464fe6 Mon Sep 17 00:00:00 2001 From: Fringg Date: Fri, 24 Apr 2026 06:59:55 +0300 Subject: [PATCH] fix: show sub-rows for single-subscription users + fix floating bar position - Auto-expand ALL users with subscriptions (was only > 1), so users with single subscription also show their sub-row for selection - FloatingActionBar: render via createPortal to document.body to ensure fixed positioning works correctly regardless of parent overflow/transform contexts (was trapped inside scrollable area) --- src/pages/AdminBulkActions.tsx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/pages/AdminBulkActions.tsx b/src/pages/AdminBulkActions.tsx index 3f2662b..1a5bdba 100644 --- a/src/pages/AdminBulkActions.tsx +++ b/src/pages/AdminBulkActions.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react'; +import { createPortal } from 'react-dom'; import { useNavigate } from 'react-router'; import { useTranslation } from 'react-i18next'; import { @@ -1451,10 +1452,10 @@ export default function AdminBulkActions() { ); setUsers(data.users); setTotal(data.total); - // Auto-expand all users with multiple subscriptions + // Auto-expand all users who have subscriptions const autoExpand: Record = {}; for (const u of data.users) { - if ((u.subscriptions?.length ?? 0) > 1) { + if ((u.subscriptions?.length ?? 0) > 0) { autoExpand[u.id] = true; } } @@ -2181,15 +2182,18 @@ export default function AdminBulkActions() { )} - {/* Floating action bar */} - + {/* Floating action bar — portal to body for correct fixed positioning */} + {createPortal( + , + document.body, + )} {/* Action modal */}