first push
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
@using MudBlazor
|
||||
|
||||
<MudDialog>
|
||||
<DialogContent>
|
||||
<MudTextField @bind-Value="SearchTerm"
|
||||
Label="Recherche"
|
||||
Variant="Variant.Outlined"
|
||||
FullWidth="true" />
|
||||
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
Class="mt-2"
|
||||
OnClick="Submit">
|
||||
Rechercher
|
||||
</MudButton>
|
||||
</DialogContent>
|
||||
</MudDialog>
|
||||
|
||||
@code {
|
||||
private string SearchTerm { get; set; } = "";
|
||||
|
||||
[Parameter] public EventCallback<string> OnSearch { get; set; }
|
||||
|
||||
[CascadingParameter] IMudDialogInstance Dialog { get; set; }
|
||||
|
||||
private async Task Submit()
|
||||
{
|
||||
if (OnSearch.HasDelegate)
|
||||
await OnSearch.InvokeAsync(SearchTerm);
|
||||
|
||||
Dialog?.Close(DialogResult.Ok(SearchTerm)); // IMPORTANT
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user