Multi-Select Across Different Filters

Demonstration of maintaining selection state when switching between filters

Key Features:

  • Compact Summary Bar: Shows selection count and actions without pushing content down
  • Expandable Details: Click "Show Details" to see full list of selected items
  • Visual Indicators: Selected rows highlighted in current table view
  • Filter Badges: Shows count of selections per filter tab
  • Cross-Filter Selection: Selections preserved when switching between filters

Filter by Status

Active Users 3 items

Actions Name Email Status Last Login
John Doe john@example.com Active 2025-10-13
Jane Smith jane@example.com Active 2025-10-12
Mike Johnson mike@example.com Active 2025-10-11

Implementation Notes

Visual Pattern Components
  1. Selection Summary Bar
    • Appears between filters and data table when items are selected
    • Shows selection count and bulk action buttons (Delete, Export, Clear)
    • "Show Details" button to expand full list (collapsed by default)
    • Uses pa-alert pa-alert--primary for visual consistency
  2. Selection Details Table (Expandable)
    • Hidden by default, user can expand via "Show Details" button
    • Shows full table of all selected items from all filters
    • Includes "Source Filter" column showing where each item was selected
    • Individual remove buttons per row for granular control
  3. Filter Tab Badges
    • Each filter tab shows count of selected items from that filter
    • Updates in real-time as selections change
  4. Row Highlighting
    • Selected rows have distinct background via pa-table__row--selected
    • Checkboxes remain checked when switching filters
  5. Bulk Selection Controls
    • "Select All Visible" — checks all rows in current filter view
    • "Deselect All Visible" — unchecks visible rows (preserves hidden selections)
    • Header checkbox with indeterminate state support
LiveView Implementation

This demo uses server-side state management via LiveView assigns:

  • Selection stored as a Map keyed by item ID with item data and source filter
  • Filter switching preserves all selections across filter states
  • All UI updates happen via standard LiveView event handling

John Doe

Administrator

Settings

Sidebar
Display
Profile Panel
Body text size. All elements scale proportionally.