Skip to content

onCellFocused and onAreaSelected not firing with Shift/Ctrl+A selection #534

@Labibmon

Description

@Labibmon

Describe the Bug

When selecting multiple cells using Shift+Click or Ctrl+A, the onCellFocused and onAreaSelected events do not trigger. They only work with single-click selections.

Steps to Reproduce

  1. Use the following code (minimal example):
    <ReactGrid
      onCellFocused={(e) => console.log("Focused:", e)}
      onAreaSelected={(e) => console.log("Selected:", e)}
      cells={cells}
    />

Current behavior
Select cells using:

  • Single click → Events fire ✅
  • Shift+Click → No events ❌
  • Ctrl+A → No events ❌

Expected behavior

  • onCellFocused should fire when the focus changes during multi-select.
  • onAreaSelected should fire when a new area is selected (e.g., via Shift or Ctrl+A).

Screenshots or gifs
GIF showing Shift/Ctrl+A not triggering events

Sourcecode Testing
https://github.com/Labibmon/silevis-reactgrid

Your environment details

  • React: 18.2.0
  • @silevis/reactgrid: 5.0.0-alpha.11
  • Browser Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions