diff --git a/src/Elmish.WPF.Tests/DynamicViewModelTests.fs b/src/Elmish.WPF.Tests/DynamicViewModelTests.fs index 4d1aeba8..1e992b01 100644 --- a/src/Elmish.WPF.Tests/DynamicViewModelTests.fs +++ b/src/Elmish.WPF.Tests/DynamicViewModelTests.fs @@ -127,7 +127,7 @@ module Helpers = AutoRequery = autoRequery } |> CmdData |> BaseBindingData - |> createBinding) name + |> Binding.createBinding) name let internal subModel diff --git a/src/Elmish.WPF/Binding.fs b/src/Elmish.WPF/Binding.fs index 47f30204..19c6a76b 100644 --- a/src/Elmish.WPF/Binding.fs +++ b/src/Elmish.WPF/Binding.fs @@ -6,11 +6,12 @@ open Elmish module Binding = + let internal createBinding data name = { Data = data |> BindingData.boxT; Name = name } open BindingData let internal mapData f binding = - { Name = binding.Name - Data = binding.Data |> f } + { Data = binding.Data |> f + Name = binding.Name } /// Maps the model of a binding via a contravariant mapping. let mapModel (f: 'a -> 'b) (binding: Binding<'b, 'msg>) = f |> mapModel |> mapData <| binding diff --git a/src/Elmish.WPF/DynamicViewModel.fs b/src/Elmish.WPF/DynamicViewModel.fs index aea0d16c..5fd55c3a 100644 --- a/src/Elmish.WPF/DynamicViewModel.fs +++ b/src/Elmish.WPF/DynamicViewModel.fs @@ -18,10 +18,6 @@ type Binding<'model, 'msg> = [] module internal Helpers = - let createBinding data name = - { Name = name - Data = data |> BindingData.boxT } - type SubModelSelectedItemLast with member this.CompareBindings() : Binding<'model, 'msg> -> Binding<'model, 'msg> -> int = fun a b -> this.Recursive(a.Data) - this.Recursive(b.Data)