vaadin / vaadin-context-menu

The responsive Web Component for showing context dependent items for any element on the page. Part of the Vaadin components.
https://vaadin.com/components
Apache License 2.0
26 stars 10 forks source link

ContextMenuRendererContext.details property is defined as `object` #309

Closed DiegoCardoso closed 3 years ago

DiegoCardoso commented 3 years ago

It should have a proper type definition to allow using the sourceEvent property set on the details property of the context passed to the renderer function.

Expected

const { sourceEvent } = context.detail;

Actual

const { sourceEvent } = context.detail as { sourceEvent: Event };