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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

do not display toast content in first time

Thread ID:

Created:

Updated:

Platform:

Replies:

151362 Feb 7,2020 07:52 PM UTC May 18,2020 11:05 AM UTC Blazor 3
loading
Tags: Toast
ebi torabi
Asked On February 7, 2020 07:52 PM UTC

Please see Attached video.

<MyEjsToast @ref="MyEjsToast" Target="#toast_pos_target" XPosition="ToastXPosition.Center" Height="150px"  YPosition="ToastYPosition.Top" 
            Title="@PayAttentionLabel.Field" 
            ShowCloseButton="true" ShowProgressBar="true" Content="@validationMessage" TimeOut="7000">

</MyEjsToast>

 async Task ShowValidatioMessage()
    {
        if (!ValidationResult.FieldIsValid)
        {
            var message = ValidationResult.Messages.FirstOrDefault();
            if (message != null)
            {
                if (ValidationResult.Messages.FirstOrDefault() != "")
                {

                    validationMessage = ValidationResult.Messages.FirstOrDefault();
                    //await Task.Delay(100);

                    await  MyEjsToast.RefToast.Show();

                }
            }
        }
    }

Attachment: ToastContent_3ff4cc07.zip

Indrajith Srinivasan [Syncfusion]
Replied On February 10, 2020 10:39 AM UTC

Hi Ebi, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query “the new content value is not updated in the Toast model for the first-time”. Since the value dynamically updated and show method is invoked immediately, the content is not showing the updated content on toast notification. So, we suggest you call toast Show() method after some delay as follows. 
 
 
 async Task ShowValidatioMessage() 
    { 
        if (!ValidationResult.FieldIsValid) 
        { 
            var message = ValidationResult.Messages.FirstOrDefault(); 
            if (message != null) 
            { 
                if (ValidationResult.Messages.FirstOrDefault() != "") 
                { 
 
                    validationMessage = ValidationResult.Messages.FirstOrDefault(); 
                    await Task.Delay(100); // Delay to update the content changes in Toast model 
 
                    await  MyEjsToast.RefToast.Show(); 
 
                } 
            } 
        } 
    } 
 
 
Can you please try out the above solution and let us know if you face any difficulties? 
 
Regards, 
Indrajith 


Indrajith Srinivasan [Syncfusion]
Replied On May 18, 2020 11:05 AM UTC

Hi Gopalakrishnan,

Greetings from Syncfusion support,

We have validated your reported query. We have prepared a sample with the SfToast shown on Data removed from Database and SfToast showing on a button click which works fine. In the below example the following configurations are done.
 
 
  • Showing SfToast on button click.
  • Remove data from the Grid Database using the Delete Icon and showing the SfToast once it is deleted.
 
 
Can you please share us the following details, 
 
  • Can you please share the video demo of the issue reproducing scenario
  • If possible can you please replicate, the issue in the above sample and revert back to us.
  • Are you able to reproduce the reported issue in the above sample?
  • Nuget Version you are facing issue with SfToast?
 
If we are able to reproduce the issue from our end we will validate and provide the solution at earliest. 
 
Regards, 
Indrajith 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon