Replies: 2 comments
-
I believe I had the same problem when I was creating a demo for the charts. So I just used a member variable instead of using the Look here for reference https://github.com/stsrki/Blazorise/blob/master/Demos/Blazorise.Demo/Pages/Tests/ChartsPage.razor#L113 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'd like to know why the "first render" judgment fails |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am using net Core with blazor and Blazorise for charts (they look awesome btw :-) ).
I stumbled upon 2 problems with rendering the charts. I looked in the documentation and I added method
protected override async Task OnAfterRenderAsync(bool firstRender) (see in the code below)
The problem is that this method always fires twice. It renders the charts in the first go and the second time it leaves them empty (as firstRender = false the second time it fires). If I remove the if block the charts render ok.
Furthermore I've added button that should refresh the data and charts. After pressing this button the charts refresh twice (this is unwanted behaviour as it distracts the users) and what is interesting the data itself (the values) change after the second go.
Have anybody dealt with this problem before?
My html button to refresh the data:
<div class="btn" @onclick="(async () => await RerenderPage())">Refresh Data</div>
My c# code:
Beta Was this translation helpful? Give feedback.
All reactions