Toolbar is not shown when reloading

Hi,

 I have this declaration for richtext as ff:
 <SfRichTextEditor Placeholder="Prescription Header..." @bind-Value="PrintSetting.PrescriptionHeader">
                <RichTextEditorToolbarSettings Items="Tools" Type="ToolbarType.MultiRow"></RichTextEditorToolbarSettings>
            </SfRichTextEditor>

I am showing that inside sfdialog

During first load, the result is like this


But when I reload/view again the view becomes like this:



Please tell me what should I call to refresh/reload the toolbar ?

Thanks.

6 Replies 1 reply marked as answer

MS Martin Sato replied to Martin Sato April 16, 2021 07:42 AM UTC

Hi,

 I have this declaration for richtext as ff:
 <SfRichTextEditor Placeholder="Prescription Header..." @bind-Value="PrintSetting.PrescriptionHeader">
                <RichTextEditorToolbarSettings Items="Tools" Type="ToolbarType.MultiRow"></RichTextEditorToolbarSettings>
            </SfRichTextEditor>

I am showing that inside sfdialog

During first load, the result is like this


But when I reload/view again the view becomes like this:



Please tell me what should I call to refresh/reload the toolbar ?

Thanks.

Please see attached sample project,

please click print settings, then click any items, then go back to print settings, toolbar for richtext control is gone.

Thanks

Attachment: RICHTEXTTOOLBARISSUE_95b97574.rar


RK Revanth Krishnan Syncfusion Team April 16, 2021 01:07 PM UTC

Hi Martin, 
 
 
Greetings from Syncfusion support. 
 
 
We have validated your query “Toolbar is not showing when reloading the page”. 
 
We tried to run the shared sample, but we are not able to run the shared sample. We tried to reproduce the issue by making the sample with the code, but we couldn’t reproduce the issue from our end. 
 
We have prepared a sample for your reference, 
 
Can you please share us with the issue reproducing runnable sample or please modify the shared sample with the issue reproducing steps so that it will be helpful for us to validated and reproduce the issue from our end and assist you at the earliest? 
 
Regards, 
Revanth 



MS Martin Sato replied to Revanth Krishnan April 16, 2021 01:40 PM UTC

Hi Martin, 
 
 
Greetings from Syncfusion support. 
 
 
We have validated your query “Toolbar is not showing when reloading the page”. 
 
We tried to run the shared sample, but we are not able to run the shared sample. We tried to reproduce the issue by making the sample with the code, but we couldn’t reproduce the issue from our end. 
 
We have prepared a sample for your reference, 
 
Can you please share us with the issue reproducing runnable sample or please modify the shared sample with the issue reproducing steps so that it will be helpful for us to validated and reproduce the issue from our end and assist you at the earliest? 
 
Regards, 
Revanth 


I am re-attaching the project, I forgot to resave the project before sending, p lease try this project.

Attachment: RICHTEXTTOOLBARISSUE_af3b83d9.rar


RK Revanth Krishnan Syncfusion Team April 19, 2021 06:20 AM UTC

Hi Martin, 
 
 
Good day to you. 
 
 
We have further validated your query with the shared sample and we were able to reproduce the issue and this issue can be resolved by calling the ‘RefreshUI’ public method of the Rich Text Editor in the ‘OnAfterRenderAsync’ method with a minimum time delay. We have modified the shared sample for your reference, 
 
Code Snippet: 
 
protected override async Task<Task> OnAfterRenderAsync(bool firstRender) 
{ 
    if(firstRender) 
    { 
                 
 
    } 
    await Task.Delay(1000); 
    this.header?.RefreshUI(); 
    this.presc_header?.RefreshUI(); 
    this.footer?.RefreshUI(); 
    return base.OnAfterRenderAsync(firstRender); 
} 
 
 
Please check the above code snippet and the sample and let us know if it resolves your issue. 
 
Regards, 
Revanth 


Marked as answer

MS Martin Sato replied to Revanth Krishnan April 19, 2021 01:38 PM UTC

Hi Martin, 
 
 
Good day to you. 
 
 
We have further validated your query with the shared sample and we were able to reproduce the issue and this issue can be resolved by calling the ‘RefreshUI’ public method of the Rich Text Editor in the ‘OnAfterRenderAsync’ method with a minimum time delay. We have modified the shared sample for your reference, 
 
Code Snippet: 
 
protected override async Task<Task> OnAfterRenderAsync(bool firstRender) 
{ 
    if(firstRender) 
    { 
                 
 
    } 
    await Task.Delay(1000); 
    this.header?.RefreshUI(); 
    this.presc_header?.RefreshUI(); 
    this.footer?.RefreshUI(); 
    return base.OnAfterRenderAsync(firstRender); 
} 
 
 
Please check the above code snippet and the sample and let us know if it resolves your issue. 
 
Regards, 
Revanth 


Thanks a lot, it's working now.


RK Revanth Krishnan Syncfusion Team April 20, 2021 03:24 AM UTC

Hi Martin, 
 
Thanks for the update. 
 
We are glad that the reported issue has been resolved, please let us know if you need any further assistance. 
 
Regards, 
Revanth 


Loader.
Up arrow icon