Closed tolu closed 4 years ago
A quick fix / solution for consumers:
button[aria-label]
to something other than core-toggle[popup]
fikset i @nrk/core-toggle@3.0.8.
nå kan du putte din button-tekst inni en <span>
så vil all markup inni button preserveres med popup
option i bruk. https://static.nrk.no/core-components/latest/index.html?core-toggle/readme.md#popup-and-button-html
Description
CoreToggle sets
this.button.innerHTML = label
whenpopup != false
inconnectedCallback
.Some minor local testing suggests this can be remedied by
Example
Minimal example
Working Example: https://codesandbox.io/embed/coretoggle-bug-tygc8
Details
The issue is related to
connectedCallback
wherethis.value
is set tothis.button.textContent
.https://github.com/nrkno/core-components/blob/52271a339f5e0b3960d923719995703cb72db825/packages/core-toggle/core-toggle.js#L10
https://github.com/nrkno/core-components/blob/52271a339f5e0b3960d923719995703cb72db825/packages/core-toggle/core-toggle.js#L64-L74