How to set the target of toast to a custom element, not a string

How to set the target of toast to a custom element, not a string,

I found the target in the api documentation, showing that HtmlElement can be set.



I tested it and it didn't work. Then, I found from the source code that only string can be defined, otherwise body is used. Our project cannot be set to string, because there are multiple similarly defined tags, the tags obtained by document.querySelector may not be correct.



How can I set the target of the toast as a custom element?

Looking forward to your reply


2 Replies

BS Buvana Sathasivam Syncfusion Team June 10, 2022 03:13 PM UTC

Hi Bingxueyinlian,


Greetings from Syncfusion support.


We have considered the issue "Target property of the Toast component does not support the html element as a bug from our end, and the fix for the issue will be included with our upcoming Volume 2, 2022 release, which is estimated to be available in the middle of July. 

You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link:

https://www.syncfusion.com/feedback/35580/target-property-of-the-toast-component-does-not-support-the-html-element


Regards,

Buvana S



BS Buvana Sathasivam Syncfusion Team July 1, 2022 06:25 AM UTC

Hi Bingxueyinlian,


We are glad to announce that our Essential Studio 2022 Volume 2 release v20.2.0.36 is rolled out and is available for download under the following link.


https://www.syncfusion.com/forums/175975/essential-studio-2022-volume-2-main-release-v20-2-0-36-is-available-for-download


We have included the fix for the issue "Target property of the Toast component does not support the html element" with our package version 20.2.36. So, can you please upgrade your package to the latest to resolve the issue from your end.


Sample: https://stackblitz.com/edit/gwnofd?file=index.html,index.ts


Feedback link: https://www.syncfusion.com/feedback/35580/target-property-of-the-toast-component-does-not-support-the-html-element


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,          

Buvana S


Loader.
Up arrow icon