Closed houstonhaynes closed 10 months ago
To confirm I removed SourceList.clear
and the issue went away (and the Actions list never clears, which I don't mind)
I tried this - no difference. I'm not sure what might cause the entire UI element to disappear. It's out of my depth.
| Reset ->
// insert new Series - send the current series length to the newSeries function
model.Series.[0].Values <- newSeries(Some values.Count)
model.Actions.Clear()
model.Actions.Add({ Description = "Reset Chart"; Timestamp = DateTime.Now })
{ model with IsAutoUpdateChecked = false }
OK - last experiment - also the same behavior...
| Reset ->
// insert new Series - send the current series length to the newSeries function
model.Series[0].Values <- newSeries(Some values.Count)
{ model with
// deactivate the AutoUpdate ToggleButton in the UI
IsAutoUpdateChecked = false
Actions = model.Actions |> SourceList.clear |> ignore
|> SourceList.create
|> SourceList.add { Description = "Reset Chart"; Timestamp = DateTime.Now } }
SourceList.clear seems to do some unkind things to the model context
Hmm. Interesting!
Removing SourceList.clear
doesn't fix it for me.
Never mind, I had to do a Rebuild. 🤷♂️
SourceList.clear
(it was doing the same thing to the CounterView
).SourceList.removeAll
that iterates and removes all items
Just an FYI - I'm looking at this for the first time in a while and just noticed that the "Actions" list is getting dropped in the UI. I believe that this is happening on "Reset"
[v2-beta]
https://github.com/JordanMarr/ReactiveElmish.Avalonia/assets/8174976/c78e4c4b-2efb-4f4d-8c9b-4e4e3292df53