Fixed selection
This commit is contained in:
@@ -32,10 +32,7 @@ public partial class ObservableCollectionViewModel<TViewModel> :
|
|||||||
private bool clearing;
|
private bool clearing;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private bool isInitialized;
|
private bool initialized;
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private int selectedIndex = 0;
|
|
||||||
|
|
||||||
private bool selfDisposing;
|
private bool selfDisposing;
|
||||||
|
|
||||||
@@ -325,12 +322,12 @@ public partial class ObservableCollectionViewModel<TViewModel> :
|
|||||||
|
|
||||||
public async Task Initialize()
|
public async Task Initialize()
|
||||||
{
|
{
|
||||||
if (IsInitialized)
|
if (Initialized)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IsInitialized = true;
|
Initialized = true;
|
||||||
await Enumerate();
|
await Enumerate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,7 +407,7 @@ public partial class ObservableCollectionViewModel<TViewModel> :
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void ClearItems() =>
|
protected virtual void ClearItems() =>
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
|
|
||||||
protected virtual void InsertItem(int index,
|
protected virtual void InsertItem(int index,
|
||||||
TViewModel item)
|
TViewModel item)
|
||||||
|
|||||||
Reference in New Issue
Block a user