Description
Bug Report
While attempting to use the event va-component-did-load
found that it didnt appear to be working, also found while looking at the code that there were no tests around the event.
What happened
The event va-component-did-load
on vaAlert appear to not properly work and there are no tests or an explanation of how to implement it in Storybook.
What I expected to happen
The event va-component-did-load
on vaAlert should emit and it is not.
Also there are no tests or an example of how to use it in code.
Reproducing
In code added this
<VaAlert
close-btn-aria-label="Close notification"
className="claims-alert"
closeable={closeable}
onCloseEvent={onClose}
status={type}
visible
onVaComponentDidLoad={() => {
console.log('Component Loaded');
}}
>
<h2 slot="headline">{title}</h2>
<p className="vads-u-margin-y--0">{body}</p>
</VaAlert>
and it did not work. After messing around with the event name I tried this an it appears to work but it is not intuitive.
<VaAlert
close-btn-aria-label="Close notification"
className="claims-alert"
closeable={closeable}
onCloseEvent={onClose}
status={type}
visible
onVa-component-did-load={() => {
console.log('Component Loaded');
}}
>
<h2 slot="headline">{title}</h2>
<p className="vads-u-margin-y--0">{body}</p>
</VaAlert>
Urgency
How urgent is this request? Please select the appropriate option below and/or provide details
- This bug is blocking work currently in progress
- This bug is affecting work currently in progress but we have a workaround
- This bug is blocking work planned within the next few sprints
- This bug is not blocking any work
- Other
Details
We would like the ability to use onVaComponentDidLoad
instead of using onVa-component-did-load
. We would also like there to be tests around this event and for storybook to better explain how implementation works for this event as it.
Activity