File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/BootstrapBlazor/Components/Search Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public partial class Search<TValue>
133133 /// Gets or sets the callback delegate when the search button is clicked.
134134 /// </summary>
135135 [ Parameter ]
136- public Func < string , Task < IEnumerable < TValue > > > ? OnSearch { get ; set ; }
136+ public Func < string ? , Task < IEnumerable < TValue > > > ? OnSearch { get ; set ; }
137137
138138 /// <summary>
139139 /// Gets or sets the callback method to get display text. Default is null, using ToString() method.
@@ -209,7 +209,7 @@ protected override void OnParametersSet()
209209 }
210210 }
211211
212- private string _displayText = "" ;
212+ private string ? _displayText ;
213213 private async Task OnSearchClick ( )
214214 {
215215 if ( OnSearch != null )
@@ -229,7 +229,7 @@ private async Task OnSearchClick()
229229
230230 private async Task OnClearClick ( )
231231 {
232- _displayText = "" ;
232+ _displayText = null ;
233233 if ( OnClear != null )
234234 {
235235 await OnClear ( ) ;
@@ -250,7 +250,7 @@ private async Task OnClearClick()
250250 private async Task OnClickItem ( TValue val )
251251 {
252252 CurrentValue = val ;
253- _displayText = GetDisplayText ( val ) ?? "" ;
253+ _displayText = GetDisplayText ( val ) ;
254254
255255 if ( OnSelectedItemChanged != null )
256256 {
You can’t perform that action at this time.
0 commit comments