From a3a7e17ccab1a81a3626021c2454d985d6549d91 Mon Sep 17 00:00:00 2001 From: keyhan Date: Thu, 18 Jun 2026 13:29:08 +0330 Subject: [PATCH] fix(frontend): horizontal-scroll table wrapper + portal Select dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make .table-wrapper overflow-x-auto so wide rows (long name + email) stay reachable — the actions column (deactivate/reset password) was clipped before. Render the Select option list in a body-level portal with fixed positioning so it is never clipped by the scroll container. Co-Authored-By: Claude Opus 4.8 --- frontend/src/app/globals.css | 2 +- frontend/src/components/ui/select.tsx | 72 +++++++++++++++++++++------ 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index bb7ed5f..eaf6a7a 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -110,7 +110,7 @@ /* ─── Table ──────────────────────────────────────────── */ .table-wrapper { - @apply overflow-hidden rounded-2xl border border-gray-200/80 bg-white shadow-sm; + @apply overflow-x-auto rounded-2xl border border-gray-200/80 bg-white shadow-sm; } /* ─── Loading skeleton ──────────────────────────────── */ diff --git a/frontend/src/components/ui/select.tsx b/frontend/src/components/ui/select.tsx index b7cc492..411652d 100644 --- a/frontend/src/components/ui/select.tsx +++ b/frontend/src/components/ui/select.tsx @@ -1,15 +1,17 @@ 'use client'; import { useState, useRef, useEffect, useCallback } from 'react'; +import { createPortal } from 'react-dom'; import { ChevronDown, Check } from 'lucide-react'; export type SelectOption = { value: string; label: string; disabled?: boolean }; /** - * Lightweight custom dropdown. Unlike a native