We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

No error shows when Toast CssClass property is empty.

Toast do not show when EjsToast CssClass property is set but variable value is empty.

It may perhaps be a good idea as a warning or error that when value or invalid toast type is not assigned, an error must show because it causes confusion looking for an error.

<EjsToast @ref="ToastObj"
          Title="@toastTitle"
          Content="@toastContent"
          TimeOut="3000"
          CssClass="@toastCss">
    <ToastPosition X="46%" Y="50%" />
</EjsToast

private sync Task MyMethod()
{
         toastTitle = "The title";
         toastContent = "Some content here.";
         toastCss = ""; // this was accidentally placed with empty string.
         StateHasChanged();
         await Task.Delay(100);
         this.ToastObj.Show();
}

2 Replies

PM Pandiyaraj Muniyandi Syncfusion Team November 22, 2019 08:54 AM UTC

Hi J, 
 
Greetings from Syncfusion support. 
 
We have validated the reported issue with shared sample code blocks and able to reproduce from our end. We get the console error on NuGet package version 17.3.0.27-beta version. We confirmed Issue with updating a CssClass property with an empty stringas defect from our end. We will resolve the issue and include the fix in the first week of December bi-weekly patch release. 
 
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/10333/ 
 
Regards, 
Pandiyaraj 



PM Pandiyaraj Muniyandi Syncfusion Team December 4, 2019 08:22 AM UTC

Hi J, 
 
Good day to you. 
 
We have resolved your reported issue "Issue with updating a CssClass property with an empty string" from our end. We suggest you upgrade the following CDN reference to 17.3.30 version to resolve the issue in your application. 
 
 
    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.3.30/material.css" rel="stylesheet" /> 
 
 
We have prepared sample for your reference to meet your requirement and download it from below link. 
 
Regards, 
Pandiyaraj 


Loader.
Live Chat Icon For mobile
Up arrow icon