Open sarveswaran-ramanathan opened 1 year ago
@sarveswaran-ramanathan
Can you either use
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