components icon indicating copy to clipboard operation
components copied to clipboard

Selection issues when using a sl-grid-selection-column and groupHeaders

Open PaulineKK opened this issue 1 year ago โ€ข 4 comments

Provide a general summary of the issue here

When you toggle a group, the existing selection is removed.

๐Ÿค” Expected Behavior?

I expect the current selection to stay the same.

๐Ÿ˜ฏ Current Behavior

Whenever you collapse or expand a group, the selection you had is removed.

๐Ÿ’ Possible Solution

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

Start: Have a grid with multiple groups, all collapsed.

Step 1: Expand a group Step 2: Select at least one item Step 3: Expand another group

Error: Your selection is removed.

What browsers are you seeing the problem on? (only for bugs in code)

Chrome

If other, please specify.

No response

What operating system are you using?

Windows

๐Ÿ‘ค Your name

Pauline Kingma

๐Ÿงข Your product/team

Magister

๐ŸŽจ Your Theme(s)

Magister

### Tasks
- [ ] make new tokens available in magister theme (and all other themes)

PaulineKK avatar Nov 04 '24 09:11 PaulineKK

@PaulineKK Can you maybe provide an example (preferably code/proof of concept, but at least a video) of what you are trying to do? And also which version of the data-grid component you are using? We've recently updated the way selection works, so make sure you are using the latest version.

In our current version I've made this example: Image And that works as you expect, so we need a bit more information to be able to help you out.

I can't get the video to embed, but you can see how it works here: https://github.com/user-attachments/assets/da00b6ff-26ba-4591-ab65-f778ece616d9

Diaan avatar Nov 05 '24 10:11 Diaan

I'm using version: 0.1.12. (On SLDS Storybook the grid in Magister Theme is broken, Jeroen Z. advised me not to update because of that.) But if you have fixed this I would love to update, especially if this bug is fixed!

PaulineKK avatar Nov 05 '24 10:11 PaulineKK

I see the Magister theme is indeed severely broken ๐Ÿ˜… We'll fix that first and then hopefully the issue you reported here will automatically be fixed, and otherwise we will have another look at it.

Diaan avatar Nov 05 '24 11:11 Diaan

@jpzwarte will check issue(s) with the grid within the Magister dev team to see how critical it is.

DanielleRameau avatar Nov 06 '24 08:11 DanielleRameau