fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Picker: "removeButtonAriaLabel" don't have access to corresponding tag

Open pandey11 opened this issue 7 years ago • 5 comments

Is there any way get corresponding tag for closing button. Currently we can add only generic value for all.

pandey11 avatar Jun 11 '19 08:06 pandey11

Hey @pandey11 thanks for opening an issue! We do ask when opening an issue that you please provide a CodePen sample of the issue you're facing so we can better understand or if you have a question that you direct it to StackOverflow. Thanks!

natalieethell avatar Jun 11 '19 16:06 natalieethell

@Naninani Hope this help in clarifying the issue.

<TagPicker removeButtonAriaLabel= "This property is expecting a string. There is no way to dynamically assign corresponding tag text" />

Expect Behavior: There should be way to assign call back function which has access to corresponding tag Capture

pandey11 avatar Jun 11 '19 17:06 pandey11

@pandey11 you can actually do this already! Check out this codepen. You can pass in a custom renderer that takes in all the props and returns a custom label for each item!

joschect avatar Jun 11 '19 21:06 joschect

@pandey11 Line 46 in the codepen is the bit that does the work of adding a dynamic label.

joschect avatar Jun 11 '19 21:06 joschect

@joschect cool thanks

pandey11 avatar Jun 11 '19 23:06 pandey11