File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed
roles/ui/files/FWO.UI/Shared Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change 269269
270270 private async Task SelectElement (ElementType element )
271271 {
272- Debug .Assert (! Multiselect , " If the Multiselect option is enabled do not use the property SelectedElement but SelectedElements instead." );
273- if (( SelectedElements .Count () == 0 && element != null ) || ! Object .Equals (element , SelectedElements .FirstOrDefault ()))
272+ if (element == null )
274273 {
275- if (element == null )
274+ Debug .Assert (Nullable == true , " The assigned value is null but the Nullable option is not enabled." );
275+ SelectedElements = Enumerable .Empty <ElementType >();
276+ }
277+ else
278+ {
279+ if (Multiselect )
276280 {
277- Debug . Assert ( Nullable == true , " The assigned value is null but the Nullable option is not enabled. " );
278- SelectedElements = Enumerable . Empty < ElementType >( );
281+ SelectedElements = SelectedElements . Append ( element );
282+ await SelectedElementsChanged . InvokeAsync ( SelectedElements );
279283 }
280284 else
281285 {
282- if (Multiselect )
283- {
284- SelectedElements = SelectedElements .Append (element );
285- await SelectedElementsChanged .InvokeAsync (SelectedElements );
286- }
287- else
288- {
289- SelectedElement = element ;
290- await SelectedElementChanged .InvokeAsync (element );
291- }
286+ SelectedElement = element ;
287+ await SelectedElementChanged .InvokeAsync (element );
292288 }
293- await CompleteSelectionChange ();
294289 }
290+ await CompleteSelectionChange ();
295291 }
296292
297293 private async Task CompleteSelectionChange ()
You can’t perform that action at this time.
0 commit comments