You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TSX fails to complile with the following error when a toggle event listener is added on the <details> element:
Property 'onToggle' does not exist on type 'DetailsHTMLAttributes'. ts(2322)
This issue affects types only. If you do <details {...{ onToggle: console.log }} />, it works just fine, but I'm guessing this isn't the way we're supposed to add event listeners in our code :)
Expected behavior:
The toggle event should be supported in <details> with the onToggle property.
Steps to reproduce:
Create a basic StencilJS project with a minimal component;
Try to render the following: <details onToggle={console.log}>Content</details>.
Stencil version:
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request
Current behavior:
TSX fails to complile with the following error when a
toggle
event listener is added on the<details>
element:This issue affects types only. If you do
<details {...{ onToggle: console.log }} />
, it works just fine, but I'm guessing this isn't the way we're supposed to add event listeners in our code :)Expected behavior:
The
toggle
event should be supported in<details>
with theonToggle
property.Steps to reproduce:
<details onToggle={console.log}>Content</details>
.Related code:
stencil/src/declarations/stencil-public-runtime.ts
Lines 778 to 780 in 5adcdd3
Other information:
Simply adding
onToggle?: (event: Event) => void;
to the interface linked above should fix it, unless I'm missing something.The text was updated successfully, but these errors were encountered: