This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Bug]: Fluent Table/DataGrid - how to disable toggleRow functionality for loading / skeleton rows? #33593
Closed
2 tasks done
Component
Table
Package version
9.55.0
React version
18.2
Environment
Current Behavior
Hi,
Just a random question - let me know if this is a duplicate:
data rows
) and NOT selectable loading/skeleton rows?Suppose we have a table with 2 elements. One row is a
data row
- it contains useful data; the other is aloading row
- it is a simple loading row with no actual data - just a skeleton/shimmer animation.I want to be able to only select the first row and that's it.
The behavior should be:
true
state, notmixed
norfalse
.data row
)'s checkbox is in atrue
state.loading row
)'s checkbox is not available anyway - the DOM element is a simple div.Currently, I am able to achieve this behavior by doing an unconventional method:
I programmatically remove the
loading row
from theitems
passed to theuseTableFeatures
hook:I can see that internally, in the
fluentUI\packages\react-components\react-table\library\src\hooks\useTableSelection.ts
file, we do have some code that hints to selectable rows:I do not know how to progress further from here.
I have the workaround that I've mentioned above, but I am looking for a concrete answer to my question from the beginning.
Expected Behavior
Proposed expected behavior: Fluent should have a documented, official way to describe how we can implement a controlled multiselect table (Table or DataGrid component) that contains different kinds of row items - actual data rows, loading rows, footer rows, etc.
I was not able to find any story and/or documentation in regards to this behavior.
Reproduction
https://stackblitz.com/edit/bzl56nww?file=src%2Fexample.tsx
Steps to reproduce
dev
.mixed
state, even though the onlyselectable rows
are selected!Are you reporting an Accessibility issue?
no
Suggested severity
Medium - Has workaround
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
The text was updated successfully, but these errors were encountered: