🙋 Feature Request
A way for the table component transitions to be disabled/enabled.
🤔 Expected Behavior
Table should have a prop that can be used to toggle transitions on/off.
😯 Current Behavior
There is no way to do that currently.
💁 Possible Solution
Had a look through the code and it seems that the Table renders a TableVirtualizer that accepts a transitionDuration
|
transitionDuration: collection.body.props.isLoading && collection.size > 0 ? 0 : 500 |
and this is used in the Virtualizer to decide if the data should be animated when set
|
if (this._collection) { |
|
this._runTransaction(() => { |
|
this._collection = data; |
|
}, this.transitionDuration > 0); |
Setting that to 0 seems to disable the animations.
🧢 Your Company/Team
Adobe/Identity Mars
🙋 Feature Request
A way for the table component transitions to be disabled/enabled.
🤔 Expected Behavior
Table should have a prop that can be used to toggle transitions on/off.
😯 Current Behavior
There is no way to do that currently.
💁 Possible Solution
Had a look through the code and it seems that the
Tablerenders aTableVirtualizerthat accepts atransitionDurationreact-spectrum/packages/@react-spectrum/table/src/Table.tsx
Line 292 in 6521a98
and this is used in the
Virtualizerto decide if the data should be animated when setreact-spectrum/packages/@react-stately/virtualizer/src/Virtualizer.ts
Lines 208 to 211 in 6521a98
Setting that to 0 seems to disable the animations.
🧢 Your Company/Team
Adobe/Identity Mars