Skip to content
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

selectMode='multi' on only certain rows #152

Open
AnejVovcak opened this issue Dec 20, 2023 · 3 comments
Open

selectMode='multi' on only certain rows #152

AnejVovcak opened this issue Dec 20, 2023 · 3 comments
Assignees
Labels
breaking-change Resolving this issue will introduce a breaking change. enhancement New feature or request

Comments

@AnejVovcak
Copy link

Hi everyone!

I have a use case where I have selectMode='multi', but I want to hide the checkbox in the select column for certain rows. On select all, only the ones with checkboxes would be selected. Is that possible? If I understand correctly, multi_filtered does not support this functionality.

@uap-universe uap-universe self-assigned this Jan 2, 2024
@uap-universe uap-universe added the enhancement New feature or request label Jan 2, 2024
@uap-universe
Copy link
Collaborator

No, at the moment it is not possible.

I can imagine the following new setting:

rowSelectable: (row: Row) => boolean

similar to rowClassFunction. This function would produce a Boolean for each row, deciding whether the row is selectable.

Of course, the "select all" would need to only consider selectable rows.

I think it is a good idea - to prevent a performance nightmare - to require from that function that it is pure and cache the result in the row object and only invalidate the cache when the data of the row changes.

@uap-universe
Copy link
Collaborator

Although this feature request is ages old and there was no feedback on the proposal, I think we should finally give it a shot in v3.4.0.

@uap-universe uap-universe modified the milestone: v3.4.0 Oct 19, 2024
@uap-universe
Copy link
Collaborator

That was a bit too ambitious. The problem is, that we are still carrying the technical debt, that the DataSource implements the selection logic.
That would need to be fixed, first, but this is a breaking change. So unfortunately the topic cannot be addressed before a new major release.

@uap-universe uap-universe added the breaking-change Resolving this issue will introduce a breaking change. label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Resolving this issue will introduce a breaking change. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants