diff --git a/src/web/ui/src/Reports/State.fs b/src/web/ui/src/Reports/State.fs index 30b2506ee..742be322e 100644 --- a/src/web/ui/src/Reports/State.fs +++ b/src/web/ui/src/Reports/State.fs @@ -381,7 +381,7 @@ let update msg (model:Reports.Types.Model) : Model * Cmd = let secs:(uint32 * PositionSecurity) list = data |> List.ofArray - |> List.collect (fun i -> + |> List.collect (fun i -> JSMap.toList i.names |> List.map (fun x -> (uint32 <| fst x), @@ -393,7 +393,11 @@ let update msg (model:Reports.Types.Model) : Model * Cmd = ) ) - { model with mdRelayExpNameData = data; securityList = secs |> Map.ofList }, selectSub None model + { model with mdRelayExpNameData = data; securityList = secs |> Map.ofList }, + Cmd.batch ( + selectSub None model :: + (Cmd.ofMsg (SetPnLSort <| fst model.PnLSortDirection )):: + [ for f in model.PnLFilterValues do yield Cmd.ofMsg (SetPnLFilter (f.Key, f.Value))]) | UpdateProducts data -> { model with mdRelayProductData = data}, Cmd.ofExistingPromise (requestExpNames model.mdRelay) id (box>>ErrorOccured) | ChangePnLColumnVisibility (header, visibility) ->