-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MultiSelect issue with updating observable array fixed
- Loading branch information
1 parent
7972151
commit 85c44ca
Showing
6 changed files
with
103 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 51 additions & 51 deletions
102
src/Framework/Framework/Resources/Scripts/knockout-latest.js
Large diffs are not rendered by default.
Oops, something went wrong.
27 changes: 19 additions & 8 deletions
27
src/Samples/Common/ViewModels/ControlSamples/MultiSelect/MultiSelectViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
using System.Collections.Generic; | ||
using System; | ||
|
||
namespace DotVVM.Samples.Common.ViewModels.ControlSamples.MultiSelect | ||
{ | ||
public class MultiSelectViewModel | ||
{ | ||
public IEnumerable<string> SelectedValues { get; set; } | ||
public IEnumerable<string> Values => new[] { "Praha", "Brno", "Napajedla" }; | ||
public class MultiSelectViewModel | ||
{ | ||
public IEnumerable<string> SelectedValues { get; set; } | ||
public IEnumerable<string> Values => new[] { "Praha", "Brno", "Napajedla" }; | ||
|
||
public int ChangedCount { get; set; } | ||
public int ChangedCount { get; set; } | ||
|
||
public void OnSelectionChanged() | ||
{ | ||
ChangedCount++; | ||
public void OnSelectionChanged() | ||
{ | ||
ChangedCount++; | ||
} | ||
|
||
public void ChangeSelection() | ||
{ | ||
SelectedValues = ["Brno", "Napajedla"]; | ||
} | ||
|
||
public void ChangeSelectionHardcoded() | ||
{ | ||
SelectedValues = ["2", "3"]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters