Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #112761
    dadsa
    Participant

    Is Smart.DateRangeInput compatible with routing in Blazor? How do I preserve state on route changes?

    #112775
    Markov
    Keymaster

    Hi,

    Smart.DateRangeInput is compatible with Blazor routing because it’s a Blazor component that supports two-way data binding. However, its state does not persist automatically when you navigate to a different route and come back, because Blazor by default re-renders the component tree when navigating.

    Why state is lost?

    When you navigate between pages in Blazor (using NavLink or NavigationManager.NavigateTo), the page is disposed and re-rendered, so any selected date range in SmartDateRangeInput is reset unless you store it somewhere.

    Best regards,
    Markov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.