diff --git a/samples/BlazorClientSide/Pages/Index.razor b/samples/BlazorClientSide/Pages/Index.razor index 5a4f55c..fbb8a54 100644 --- a/samples/BlazorClientSide/Pages/Index.razor +++ b/samples/BlazorClientSide/Pages/Index.razor @@ -73,6 +73,24 @@
+

Blazored Typeahead - Disabled (Null Value)

+ + + + @person.Firstname + + + @person.Firstname @person.Lastname + + + + + +
+

Blazored Typeahead - Binding to different type

People = new List(); private Person SelectedPerson; + private Person SelectedPersonNull; private int? SelectedPersonId; private IList SelectedPeople; private FormExample FormModel = new FormExample(); diff --git a/samples/BlazorServerSide/Pages/Index.razor b/samples/BlazorServerSide/Pages/Index.razor index 396b7d6..5bd3bbc 100644 --- a/samples/BlazorServerSide/Pages/Index.razor +++ b/samples/BlazorServerSide/Pages/Index.razor @@ -73,6 +73,24 @@
+

Blazored Typeahead - Disabled (Null Value)

+ + + + @person.Firstname + + + @person.Firstname @person.Lastname + + + + + +
+

Blazored Typeahead - Binding to different type

People = new List(); private Person SelectedPerson; + private Person SelectedPersonNull; private int? SelectedPersonId; private IList SelectedPeople; private FormExample FormModel = new FormExample(); diff --git a/src/Blazored.Typeahead/BlazoredTypeahead.razor b/src/Blazored.Typeahead/BlazoredTypeahead.razor index be4391f..e6e703a 100644 --- a/src/Blazored.Typeahead/BlazoredTypeahead.razor +++ b/src/Blazored.Typeahead/BlazoredTypeahead.razor @@ -27,9 +27,12 @@ } else { -
- @SelectedTemplate(Value) -
+ if (Value != null) + { +
+ @SelectedTemplate(Value) +
+ } }