Skip to content

feat: cell activation info #1069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

BrianHung
Copy link
Collaborator

@BrianHung BrianHung commented Jul 18, 2025

This is useful if internal editor state depends on how the cell is activated. For example, "enter" key has different behavior from "F2" in Excel.

@BrianHung BrianHung force-pushed the brian/cell-activation-info branch from 2e01436 to 08ff520 Compare July 18, 2025 22:16
@lukasmasuch lukasmasuch requested a review from Copilot August 8, 2025 23:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds cell activation information to provide context about how a cell was activated (e.g., via keyboard "Enter" vs "F2", or via single-click vs double-click). This enables internal editor state to behave differently based on the activation method, similar to Excel's behavior.

  • Introduces new CellActivatedEventArgs types to capture activation context
  • Updates the onCellActivated callback to include activation information as a second parameter
  • Passes activation details through to custom editor providers

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/core/src/internal/data-grid/event-args.ts Defines new activation event types with keyboard and pointer variants
packages/core/src/internal/data-grid/data-grid-types.ts Updates editor provider types to include activation information
packages/core/src/data-editor/data-editor.tsx Implements activation event creation and propagation throughout the component
packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor.tsx Passes activation context to custom editors
packages/core/src/index.ts Exports new activation event types
packages/core/test/data-editor.test.tsx Updates tests to verify activation information is properly passed
packages/core/API.md Documents the new activation event parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant