fintraffic-design / fds-coreui-components

Fintraffic Design System's Core UI Components. Work heavily in progress.
European Union Public License 1.2
0 stars 0 forks source link

fds-dropdown can not be used with createElement() #65

Closed Haprog closed 7 months ago

Haprog commented 9 months ago

Trying to create an fds-dropdown element using document.createElement() causes a DOMException and doesn't work because the component implementation doesn't currently follow the spec. The reason is that it sets an attribute in the constructor (which is not allowed) by doing this.tabIndex = 0. This code should be moved to firstUpdated() (or connectedCallback()).

This also makes the component unusable with a React wrapper (until this is fixed).