Addressing Issue #4349 - Data attributes on Pivot Item#4461
Addressing Issue #4349 - Data attributes on Pivot Item#4461dzearing merged 5 commits intomicrosoft:masterfrom
Conversation
|
This feels a little janky and causes a lot of ambiguity. E.g. If i provide 2 options:
|
|
As of right now, you can just pass in native attribute mixed, but they don't go on the button they go on the containing div of each item. There are a few points to the choice of how to do this:
|
|
You're right about that. linkText should just be "text" like button "text". So following link* naming convention is further going down the inconsistent naming setup here. But... maybe even better:
Thoughts? |
|
Well keep in mind there are two Parts to the |
|
In the future I still think Pivot is ripe for some adjustment. Thanks for making this change. |
Pull request checklist
$ npm run changeDescription of changes
Added linkNativeProps prop to PivotItem to allow passing native props (data-* & aria-*) to the link/CommandButton element.
Usage is shown in the example:
The native props passed in the
linkNativePropsprop, will become attributes (e.g. data-order='1' data-title='My Files Title') on the PivotItem links<button>tag which is part of the CommandButton component used there.