Skip to content

Conversation

@jpzwarte
Copy link
Member

@jpzwarte jpzwarte commented Oct 29, 2025

Fixes #2804

Copilot AI review requested due to automatic review settings October 29, 2025 12:17
@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

🦋 Changeset detected

Latest commit: 231fa45

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sl-design-system/grid Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

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 improves the reliability of selection mode in the grid component by introducing a selects property on the grid itself. Previously, when an <sl-grid-selection-column> was added to a grid, it would set the selection mode on the data source, but this configuration would be lost when the items property was updated (triggering a new data source creation).

Key changes:

  • Added a selects property to the grid that accepts 'single' or 'multiple' values
  • Grid now passes the selects value to newly created data sources
  • Selection column sets the grid's selects property in addition to the data source

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/components/grid/src/grid.ts Added selects property and passes it when creating ArrayListDataSource from items
packages/components/grid/src/selection-column.ts Sets grid's selects property to 'multiple' when attached
packages/components/grid/src/grid.spec.ts Added comprehensive tests for single and multiple selection modes
.changeset/gentle-peaches-battle.md Documents the improvement to selection mode reliability

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

🕸 Website preview

You can view a preview here (commit 231fa452311d8be97a8b48ebc90638bd0b85bdf7).

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

🕸 Storybook preview

You can view a preview here (commit 231fa452311d8be97a8b48ebc90638bd0b85bdf7).

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings October 29, 2025 14:40
Copy link

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

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.

[Grid-Selection] The multiple option of ArrayListDataSource can be reset due to Angular timing

2 participants