File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed
src/BootstrapBlazor/Components/SelectGeneric Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -291,19 +291,12 @@ private SelectedItem<TValue>? SelectedRow
291291 var item = Rows . Find ( i => Equals ( i . Value , Value ) )
292292 ?? Rows . Find ( i => i . Active )
293293 ?? Rows . Where ( i => ! i . IsDisabled ) . FirstOrDefault ( )
294- ?? GetVirtualizeItem ( ) ;
294+ ?? new SelectedItem < TValue > ( Value , DefaultVirtualizeItemText ! ) ;
295295
296- if ( item != null )
296+ if ( ! _init || ! DisableItemChangedWhenFirstRender )
297297 {
298- if ( _init && DisableItemChangedWhenFirstRender )
299- {
300-
301- }
302- else
303- {
304- _ = SelectedItemChanged ( item ) ;
305- _init = false ;
306- }
298+ _ = SelectedItemChanged ( item ) ;
299+ _init = false ;
307300 }
308301 return item ;
309302 }
@@ -391,11 +384,6 @@ private async Task SearchTextChanged(string val)
391384 }
392385 }
393386
394- private SelectedItem < TValue > ? GetVirtualizeItem ( )
395- {
396- return OnQueryAsync == null ? null : new SelectedItem < TValue > ( Value , DefaultVirtualizeItemText ?? CurrentValueAsString ) ;
397- }
398-
399387 /// <summary>
400388 /// <inheritdoc/>
401389 /// </summary>
You can’t perform that action at this time.
0 commit comments