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
Describe the bug
When using ToastController, FwToast to toast FwToastMessage with action-link-text, the event fwLinkClick is not getting triggered on clicking the linkg
To Reproduce
Steps to reproduce the current behavior:
Have a FwToastMessage with action-link-text
Using ToastController or FwToast trigger the FwToastMessage.
Click on the link.
fwLinkClick is not getting emitted.
Expected behavior
fwLinkClick should be emitted for us to handle.
window.addEventListener("fwLinkClick", (e) => {
console.log(e.target); // check the e.target and perform actions based on the target clicked.
alert("link clicked");
});
or
you can create a custom link urself instead of using the action-link-text prop
<fw-toast-message type="success" id="custom-toast" timeout="6000">
<div>
<span class="custom-text">Custom content</span>
<h4>custom html contents can be added</h4>
<a href="#" onclick="alert('clicked')">custom link</a>
</div>
</fw-toast-message>
Component
FwToastMessage
Describe the bug
When using
ToastController
,FwToast
to toastFwToastMessage
withaction-link-text
, the eventfwLinkClick
is not getting triggered on clicking the linkgTo Reproduce
Steps to reproduce the current behavior:
Expected behavior
fwLinkClick should be emitted for us to handle.
code
https://codesandbox.io/s/frosty-wood-o78453?file=/src/App.js:0-1760
The text was updated successfully, but these errors were encountered: