Skip to content

Commit

Permalink
#58386 repro - HxInputTags (GitHub #36)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakenr committed Nov 3, 2021
1 parent 936184e commit 56c039b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion BlazorAppTest/Pages/HxInputTagsTest.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
<HxInputTags ShowAddButton="true" AddButtonText="Add tag" Naked Label="Tags Naked" @bind-Value="model.Tags" DataProvider="GetNewItemSuggestions" />
<HxInputTags ShowAddButton="true" AddButtonText="Add tag" Naked Label="Tags (shared Value, Large, Naked)" @bind-Value="model.Tags" DataProvider="GetNewItemSuggestions" InputSize="InputSize.Large" />
<HxInputTags ShowAddButton="true" AddButtonText="Add tag" Naked Label="Tags (shared Value, Small, Naked)" @bind-Value="model.Tags" DataProvider="GetNewItemSuggestions" InputSize="InputSize.Small" />
<HxSubmit CssClass="mt-2" Color="ThemeColor.Primary">Submit</HxSubmit>
<HxButton CssClass="mt-2" Color="ThemeColor.Primary" OnClick="HandleValidClick">Save</HxButton>
</EditForm>

ddd: @tags

@code {
private MyModel model = new MyModel();
string tags;

private Task<InputTagsDataProviderResult> GetNewItemSuggestions(InputTagsDataProviderRequest request)
{
Expand All @@ -38,4 +41,10 @@
}
}
}

public void HandleValidClick()
{
tags = "" + String.Join(',', model.Tags);
StateHasChanged();
}
}

0 comments on commit 56c039b

Please sign in to comment.