-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update binding after validation #584
Comments
In Elmish.WPF I am using the following code: "Copay" |> Binding.twoWayOpt((fun m ->Some (Copay.value m.Copay)), SetCopay) Where "Copay" is the bound property to WPF and the model defines Copay as: module Copay =
and SetCopay is: All works correctly to validate an input digital payment. However, the "get" of the binding is executed only once before the Is there anyway to force the binding to update AFTER the validation code is run? Thanks |
Can you format your question better? I'm not seeing your validation code. To try to answer the question generally, though, remember that Elmish.WPF utilizes an MVU architecture. The |
@marner2 Thank you for your response. I don't see how to reformat the above without copy/paste ? The validation code is being performed with the "match" statement just below the "Copay" binding. As to your answer, I'm hopeful there is an override (of some sort) that would allow the ".addValidtion" to trigger an update??? |
If you're wanting to modify the actual value in the model so that the |
High-level description
Describe your issue.
Steps to Reproduce
Strongly consider linking to a GitHub repository containing an application that reproduces your problem. Ideally you have tired to obtain a minimal working example. All four of the items in the External Links section in that Wikipedia article are excellent.
Steps to reproduce the behavior:
Expected or desired behavior
Describe what you expected or wanted to happen.
Actual behavior
Describe what actually happens. Consider including a screen recording of the actual behavior via a GIF. ShareX is one program that can capture a screen recroding and save it to a GIF.
Additional Information
Elmish.WPF version: ???
Target framework version: ???
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: