Completato setup iniziale componenti (from BBM)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
@using MP_STATS.Components
|
||||
@using MP_STATS.Data
|
||||
@inject MessageService MessageService
|
||||
|
||||
<div class="input-group input-group-sm">
|
||||
<input @bind-value="@searchVal" @bind-value:event="oninput" type="text" class="form-control" title="Campo Ricerca" placeholder="Ricerca [ALT-R]" accesskey="R" />
|
||||
<div class="input-group-append">
|
||||
<button @onclick="reset" class="btn btn-success input-group-text">reset</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> searchUpdated { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string searchVal
|
||||
{
|
||||
get
|
||||
{
|
||||
return MessageService.SearchVal;
|
||||
}
|
||||
set
|
||||
{
|
||||
MessageService.SearchVal = value;
|
||||
reportChange();
|
||||
}
|
||||
}
|
||||
|
||||
private void reportChange()
|
||||
{
|
||||
searchUpdated.InvokeAsync(searchVal);
|
||||
}
|
||||
|
||||
private void reset()
|
||||
{
|
||||
searchVal = "";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user