I have an issue defined by the following steps:
- I pass a value from a parent to a child via @input
- My child binds this @input to an input element
- I pass back the changed value to the parent via an event emitter
- My parent captures this event and passes to a function.
- Function realizes the input is invalid and changes the value back to a valid value
- This changed value is passed back through the @input to the child
- I repeat these steps
- However my function is now changing the value back to the exact value it was on its prior @input so the child component does not pick up the change and my parent and child are now out of sync and stay that way until I enter in a valid value again.
I have created a stackblitz here to illustrate this issue. https://stackblitz.com/edit/angular-kbpx7r If you enter 99 and then 99 again you will see the parent and the child get out of sync. You can enter any number under 10 to bring them back into sync but My issue is I need to figure out how to keep them in sync at all time.