using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Web; using OneOf; using System; using System.Threading.Tasks; namespace AntDesign { public partial class Search : Input { private bool _isSearching; [Parameter] public EventCallback OnSearch { get; set; } [Parameter] public OneOf EnterButton { get; set; } private int _sequence = 0; protected override void OnInitialized() { base.OnInitialized(); if (EnterButton.Value == null) { Suffix = new RenderFragment((builder) => { builder.OpenComponent(35); builder.AddAttribute(36, "class", $"{PrefixCls}-search-icon"); builder.AddAttribute(37, "type", "search"); builder.AddAttribute(38, "onclick", CallbackFactory.Create(this, HandleSearch)); builder.CloseComponent(); }); } else { AddOnAfter = new RenderFragment((builder) => { builder.OpenComponent