Vue Composition API: Listeners - bcgov/healthgateway GitHub Wiki
Class Component
get includeNextButton(): boolean {
return this.$listeners.clickNextButton !== undefined;
}
Notes
$listeners
has been removed and event handlers are now included in useAttrs
, except for those listed as emitted events (which should be all of our custom events).
- The simplest solution is to just add a separate prop that instructs what the behaviour should be. (In the above example, an
includeNextButton
boolean.)
Documentation