OfficeDev / office-ui-fabric-js

JavaScript components for building experiences for Office and Office 365.
http://dev.office.com/fabric
Other
368 stars 114 forks source link

Copy attributes when initializing Dropdown #390

Closed doyoucrm closed 5 years ago

doyoucrm commented 5 years ago

This may be more of a feature request since there are a number of work-arounds. However, I find it frustrating that initialized Dropdowns don't copy data attributes (or class or any other attribute for that matter) from the original option elements.

Data attributes in option elements

Obviously copying the id attribute is out of the question, but at the very least, it would be tremendously helpful for the new li elements that are created when the Dropdown is initialized to include data attributes from the original option elements.

Again...there are already plenty of other ways to work with these elements. There's data-binding with frameworks like Knockout, or you can easily use jQuery or vanilla JavaScript to get the nth child of either the select or ul elements to do your own binding.

But still... if the Dropdown's li elements could just be natively initialized with the data attributes from the original option elements, it would save a lot of time writing methods for handling this.

doyoucrm commented 5 years ago

P.S. to the community: I get that this repo has been virtually forgotten by Microsoft these days, but it's still worth logging issues and feature-requests in case some brave person wants to fork the repo.

Linda-Editor commented 5 years ago

Microsoft no longer supports this content and will not be responding to bugs or issues. We recommend that you use the newer version, Office UI Fabric, with React as your front-end framework. We are closing this issue; if you still need assistance with Fabric.js, visit Stack Overflow/office-ui-fabric.