Since updating to 0.34.1 (from 0.33.0), the MDC-Select has changed to the default HTML select structure. Things like the "SelectedOptions" on the MDC-Select are gone, but there are still referenced in the documentation. Is it correct that this need to be updated?
If you're referring to the documentation mirrored on material.io, we're still working on getting the latest update to that pushed. The MDC Select README is up-to-date in the repository.
Allright, I can see that there are some changes in the syntax to set the mdc-select in the right way. But has the Javascript also changed? I can't refer to the "selectedOptions" in the MDCSelect object anymore? Maybe it's an issue on my side, but it seems like there are some changes in the Javascript as well.
Yes, the APIs have been reduced: https://github.com/material-components/material-components-web/tree/master/packages/mdc-select#mdc-select-component-api
In terms of component APIs, we removed APIs that would now return <option> elements, with the thought that it's odd for component APIs to expose form-related DOM elements directly; it feels like a break in encapsulation.
In the case of selectedOptions, this also seemed less useful given that MDC Select is particularly for single selection, and exposes .value and .selectedIndex for this purpose.
Yeah ok, Thanks for the reply. Maybe the "example" code in the readme should be edited as well. That's still using the selectedOptions. Thanks!
Whoops, thanks for pointing that out! I'll fix that today.