CheckRules and IsDirty meta property and #issue no 945 (old forum) "Data Binding" for Rules #2128
-
i)I have a Blazor App which has page with a button bound to the IsSavable Property.When the PersonEdit is fetched from the db is the object runs BusinessRules.CheckRules() for the FullNameRule it turns that object is marked IsDirty as result of this call which also makes IsSavable true.This enables the save button on the page.The behaviour we want is for the save button to be enabled only for user initiated changes in this case editing the FirstName or LastName Properties
And the test we run is
and the test failed |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The issue here is that AddOutValue will make the object dirty if the value is changed from OuputProperty and so could trigger further rules on the changed property. I would suggest these changes:
|
Beta Was this translation helpful? Give feedback.
The issue here is that AddOutValue will make the object dirty if the value is changed from OuputProperty and so could trigger further rules on the changed property.
I would suggest these changes: