You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change events fire when the value is set from code #24
Sidebar.SelectedValueChanged, Switch.Toggled and Select.SelectedIndexChanged fire when the value is set from code, exactly as when the user changes it. Handlers can't tell the two apart.
Steps to reproduce
mySwitch.Toggled+=async(_,e)=>awaitapi.SetActive(user.Id,e.Value);mySwitch.IsToggled=user.IsActive;// fires Toggled → calls the API
Typical breakages:
Filling a table of switches from data calls the API once per row.
Syncing a sidebar with the router (a deep route /invoices/42 selecting the /invoices item) raises SelectedValueChanged, and an app that navigates on it jumps back to the section root.
Expected: these events fire only for user input (click, tap, keyboard), like Button.Clicked.
Suggested fix
Raise the events from the input handlers, not from the bindable properties' changed callbacks, or pass an IsUserInitiated flag in the event args. Apply it to MAUI and Avalonia, check other controls with the same pattern (Checkbox, RadioGroup, Slider, Tabs), and document the behaviour.
Activity