Fluentui: Controlling Tab re-renders

Created on 15 Feb 2020  路  4Comments  路  Source: microsoft/fluentui

Describe the feature that you would like added

Controlling pivotItem re-renders

  • renderActiveOnly Only the active pivotItem is rendered. Switching pivotItem unmounts the current pivotItem and mounts the new pivotItem.
  • renderActiveOnly={false} All pivotItems are rendered on Pivot mount. Switching pivotItem hides the current pivotItem and shows the new pivotItem, without unmounting pivotItems.

this will prevent filled forms to re-render on pivotitems swith ...

What component or utility would this be added to

Pivot

Additional context/screenshots

Pivot Fixed Feature

Most helpful comment

Hi @Temkit, if I'm understanding correctly you would basically like persistent and non-persistent scenarios for the Pivot component right?

@jdhuntington what do you think about this feature request?

All 4 comments

Hi @Temkit, if I'm understanding correctly you would basically like persistent and non-persistent scenarios for the Pivot component right?

@jdhuntington what do you think about this feature request?

Having a non-persistent options would be great because react should do the work of deciding when to re-mount the child components which is likely form elements. Currently, it's a complete re-render so we're losing the states. This means the child components in PivotItem require props and a stateful component above Pivot. Also, rendering resource is taken.

For instance: uncontrolled components like Dropdown for currently selected keys.

this would be great feature, no need to mount/unmount component when switching PivotItem @khmakoto

:tada:This issue was addressed in #12779, which has now been successfully released as [email protected].:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carruthe picture carruthe  路  3Comments

VincentBailly picture VincentBailly  路  3Comments

luisrudge picture luisrudge  路  3Comments

rickyp-ms picture rickyp-ms  路  3Comments

gabrielruss picture gabrielruss  路  3Comments