Not sure if this is a bug or a feature of Blazor, but here it goes.
If I have a page with consumes a component which has a html Form Tag and a submit button. The parent pages OnInit is called. Which means that all components on that page potentially gets its original state (same as on page load).
My Workaround was to have the button as type button and not submit.
My question is should an underlying component with a form trigger a parent page oninit event ?
I would expect that the component itself would handle the form submit and if needed use StateHasChanged.
Any thoughts?
Thanks for contacting us, @KennethInfoEasy.
This is indeed expected. It's not clear what you're actually trying to do here. Feel free to provide more details, and we may be able to show you a better path.
No need to investigate further as this is expected behavior. Thank you for getting back to me so quick @mkArtakMSFT.