-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fixed when using withParameter with the 'Expression<Func<TViewModel, … #1165
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
Conversation
|
Thanks for the PR Glenn. @reactiveui/reviewers-core can you please review. |
|
@glennawatson can you provide an example of code that previously failed that will now work with this PR applied? I'm a little unclear from reading the PR description. It makes it sound like it's merely fixing existing behavior, but in fact the PR adds a whole new |
|
Sorry been away of late. Will get you a example in the next day or so. |
|
@glennawatson ping |
|
Hi, Not going to be able to get back to you guys for at least a week. Been in the hospital for a bit. The main issue was using the Expression<Func<>> form, it didn't take into account changing values ex thisValue => thisValue.VM.Blah If VM wasn't set initially it wouldn't trigger properly. So I changed it to use the same mechanism you use in the other code to handle that case. |
|
If you look internally also, I added a new private method but changed the public facing method to use the new private method to use the better approach of using the new method that uses the following: var withParamExpression = Reflection.Rewrite(withParameter.Body); |
|
Anyway I'm not going to be able to help change the code sample for the next week or so due to technical restrictions, but hope that explanation helps. |
|
Thanks @glennawatson! I wish you a swift recovery. If I get a chance I'll take a look at getting this merged for the next release. |
|
@glennawatson, It will cover your contributions to all .NET Foundation-managed open source projects. |
|
I signed the CLA btw, hasn't been updated here though since I did it over a week ago. |
…ow for the case of having a null view model at the time of binding
|
Changes Unknown when pulling bb03ef8 on glennawatson:rxui7-master into ** on reactiveui:develop**. |
|
I updated with the latest develop to pass the tests. |
|
Closing due to CLA bot issues. |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
It's a bug fix for: #1164
What is the current behavior? (You can also link to an open issue here)
#1164
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change?
Don't believe so, just uses the existing view model When Any Value overloads used by the vmProperty field. This allows the ViewModel to be null initially.
Please check if the PR fulfills these requirements
Other information:
…TParam>> withParameter' overload when having initially a null ViewModel property