Hi HappyCamper,
Thanks for contacting Syncfusion support.
As per your requirement we have prepared sample, in which if the typed value is not present in the datasource, by default it shows the NoRecordsTemplate. Here instead we have included the button which shows the typed value as like below screenshot.
<SfComboBox @ref="ComboObj" TValue="string" @bind-Value="ComboValue" TItem="TItem" DataSource="@DataSource" AllowFiltering="true">
<ComboBoxFieldSettings Text="Name" Value="Name"></ComboBoxFieldSettings>
<ComboBoxEvents TValue="string" TItem="TItem" Filtering="onFiltering"></ComboBoxEvents>
<ComboBoxTemplates TItem="TItem">
<NoRecordsTemplate>
<div>
<SfButton CssClass="e-control e-btn" Content="@Content"></SfButton>
</div>
</NoRecordsTemplate>
</ComboBoxTemplates>
</SfComboBox>
@code {
public string Content = "Add";
...
public void onFiltering(Syncfusion.Blazor.DropDowns.FilteringEventArgs args)
{
CustomValue = args.Text;
this.Content = args.Text;
}
} |
Kindly check the above sample meets your requirement. If not please elaborate with more information like pictorial representation to provide you the solution at earliest.
Regards,
Ponmani M