I have a tab which displays an image (its actually a spectrogram retrieved from Azure storage). I have a modal dialog in which I can change some of the spectrogram parameters and recalculate the spectrogram and store the new image back in Azure storage.
How can I get the tab to to retrieve the new image when I close the modal dialog: i.e. re render the tab on modal dialog close. The image is retrieved from Azure via in-line code in "Blazor razor".
The render mode is the default "On demand"
|
<SfButton @onclick="ChangeImage" Content="Change Image"></SfButton>
<br /> <br /> <SfTab @ref="Tab" CssClass="e-tab-custom-class" LoadOn="ContentLoad.Demand"> <TabItems> <TabItem> <HeaderTemplate> <img class="emp" src=@ChangeContent /> </HeaderTemplate> <ContentTemplate> <img class="emp" src=@ChangeContent /> <div> Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981.He is fluent in French and Italian and reads German.He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993.Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association. </div> </ContentTemplate> </TabItem> </TabItems> </SfTab> @code {
SfTab Tab; void ChangeImage() { this.StateHasChanged(); } } |
I had to rewrite things a bit to use this approach and then it still didn't work. But I realised that was because my pop up modified the image at the URL and the URL didn't change so I used the oldtrick of adding a time dependant url parameter so the URL changed each time the url was referenced which forced the Blazer engine to reload the URL as the URL then changed.
All now works.
Thanks