- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.8k
 
Open
Labels
Component: DataGridFluent UI react-components (v9)Needs: PMIncoming shield issues that are feature type which require PM to review.Incoming shield issues that are feature type which require PM to review.Partner AskType: Feature
Description
Area
React Components (@fluentui/react-components)
Describe the feature that you would like added
If we want to enable multi select feature and need to make certain rows un-selectable, we have no native api to do that.
We can hide the checkbox and customize the onSelectionChange implementation to exclude the rows that cannot be selected, but the checkbox in header will always show that 3rd indeterminate state when all the selectable rows have been selected, because DataGrid internally doesn't know those rows are un-selectable.
To fix this issue, can we add a new prop isRowSelectable  in DataGrid:
            selectionMode="multiselect"
            isRowSelectable={(item) => {
              // Only root level rows are selectable (items without isChild flag)
              return !(item as any).isChild;
            }}
So that header checkbox can show correct state when all selectable rows have been selected.
Additional context
No response
Have you discussed this feature with our team
No response
Validations
- Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
 
Priority
High
Metadata
Metadata
Assignees
Labels
Component: DataGridFluent UI react-components (v9)Needs: PMIncoming shield issues that are feature type which require PM to review.Incoming shield issues that are feature type which require PM to review.Partner AskType: Feature