Skip to content

Commit

Permalink
Fix popup scroll reset
Browse files Browse the repository at this point in the history
Idk how it broke??
  • Loading branch information
Saalvage committed Aug 25, 2023
1 parent fa4d677 commit 8d260cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Modulhandbuch.Frontend/Components/Popup.razor
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@
[Parameter]
public string? BodyText { get; set; }

public async Task Show(string bodyText, string headerText = "") {
public void Show(string bodyText, string headerText = "") {
HeaderText = headerText;
BodyText = bodyText;
IsVisible = true;
StateHasChanged();
await JS.InvokeVoidAsync("resetBodyScroll");
}

private void Close() {
private async Task Close() {
HeaderText = string.Empty;
BodyText = string.Empty;
IsVisible = false;
StateHasChanged();
await JS.InvokeVoidAsync("resetBodyScroll");
}
}
2 changes: 1 addition & 1 deletion Modulhandbuch.Frontend/Pages/MainPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<tr>
<td>
<i class="bi bi-question-circle module-info"
@onclick="async () => await _popup.Show(NewlinesToParagraphs(module.Description), module.Name)">
@onclick="() => _popup.Show(NewlinesToParagraphs(module.Description), module.Name)">
</i>
@module.Name
</td>
Expand Down

0 comments on commit 8d260cc

Please sign in to comment.