Skip to content

Commit 81270dc

Browse files
committed
fix: SelectedItems initial values not be rendered.
1 parent da0895d commit 81270dc

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/Controls/VCheckBoxGroup.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ object newValue
7878
(newValue as INotifyCollectionChanged).CollectionChanged += (
7979
bindable as VCheckBoxGroup
8080
).VCheckBoxGroup_CollectionChanged;
81+
if (oldValue == null)
82+
{
83+
(bindable as VCheckBoxGroup).UpdateItemSelection((IList)newValue);
84+
}
8185
}
8286
else
8387
{

src/Controls/VCollection.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ object newValue
116116
(newValue as INotifyCollectionChanged).CollectionChanged += (
117117
bindable as VCollection
118118
).VCollection_CollectionChanged;
119+
if (oldValue == null)
120+
{
121+
(bindable as VCollection).UpdateItemSelection((IList)newValue);
122+
}
119123
}
120124
else
121125
{

0 commit comments

Comments
 (0)