fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Feature]: Expose tablist activeTabIndex in change event payload

Open Mich0608 opened this issue 6 months ago • 2 comments

Area

Web Components (@fluentui/web-components)

Describe the feature that you would like added

This feature request proposes that the tablist component should expose the activeTabIndex directly. Currently, only the activeid is exposed, and the change event returns the active tab as an HTMLElement. Determining the index requires querying the DOM and manually calculating it—an inefficient and unnecessary workaround.

Exposing activeTabIndex, ideally within the change event payload, would simplify usage and improve performance for a wide range of use cases. This is a common pattern in component libraries, where index-based tracking is often more reliable and lightweight than working with DOM references or IDs.

Additional context

No response

Have you discussed this feature with our team

No response

Validations

  • [x] Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Priority

None

Mich0608 avatar Jun 02 '25 20:06 Mich0608

Adding @davatron5000 to the thread. A new feature request has come in proposing that the tablist component should expose the activeTabIndex.

gouttierre avatar Jun 09 '25 14:06 gouttierre