question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Refresh button

See original GitHub issue

Good morning, first of all thanks for your work and your dedication.

I’m looking for a suitable way to refresh the contents of a modal window.

I’m thinking to a method that “remembers” also the options and parameters which were used to open the modal the first time.

In this moment I’m canceling the modal than I reopen it. [edit]The following code is present in the component displayed in the modal[/edit]

<button class="btn btn-info" @onclick="() => RefreshTicketDetails()">Refresh</button>

    protected async Task RefreshTicketDetails()
    {
        await BlazoredModal.CancelAsync();

        var options = new ModalOptions
        {
            Class = "blazored-prompt-modal",
            OverlayCustomClass = "custom-modal-overlay"
        };

        var parameters = new ModalParameters();
        parameters.Add(nameof(MyComponent.fstPar), TheFstPar);
        parameters.Add(nameof(MyComponent.sndPar), TheSndPar);
        ...
        parameters.Add(nameof(MyComponent.nthPar), TheNthPar);

        Modal.Show<MyComponent>("MyTytle", parameters, options);
    }

It works. If there aren’t other ways to reach my scope, well, I’ve a solution, but I’m wondering if you can implement a cleaner way to do it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chrissaintycommented, Jul 30, 2021

No worries. It’s easy to get into a certain way to approach a problem. Happened to me more time than I’d care to remember 🙂.

As there is nothing to do here I’m going to close this issue.

1reaction
Fragger5000commented, Jul 30, 2021

😃 right! I’m converting an old web app to blazor, I didn’t considered this optimization

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: "refresh" button · Issue #2217
I don't anticipate offering a way to "force" sync per se. If the app is connected, making any change to a note would...
Read more >
Feature request: Refresh button on 1Password Mac
Personally, I'd like a sync/refresh menu item with a keyboard shortcut (e.g., Cmd+R) to make it easy to force a sync. It'd also...
Read more >
Manual refresh button
Vladimir Poryadin. You can use Pull-to-refresh gesture on the main screen. Manual refresh button. 4 ...
Read more >
Add “Refresh” button in the browser - Feature Requests
Purpose: Refreshing the page in the mobile app browser is an essential feature that is missing for me at this time. Currently there...
Read more >
Refresh Button to Apply Filters After Making Changes to ...
Refresh Button to Apply Filters After Making Changes to Board Items - Feature requests - monday Community Forum.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found