Skip to content

Instantly share code, notes, and snippets.

View SingletonSean's full-sized avatar

SingletonSean

View GitHub Profile
@SingletonSean
SingletonSean / main.md
Last active October 7, 2021 03:21
Call a function when the user changes a value via an input control, but not when I am updating the value of the control state?

Control State

Question

Call a function when the user changes a value via an input control, but not when I am updating the value of the control state? - geocine

Solution

Expose two entry points (ex: property or function) to control the state. The input control on the view could bind to one property, and your code (ex: a command or view model) could use a different property (or function!). Both entry points would control the same data.