-
Notifications
You must be signed in to change notification settings - Fork 95
Added repro for a bug with passing commands in markup controls #1742
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
base: main
Are you sure you want to change the base?
Conversation
I fixed the error message, otherwise the behavior looks "fine" to me.
Using the value binding to call commands is definitely not recommended, commands should only be invoked from command or staticCommand bindings. |
The |
The interpreter is broken, it causes problems in #1742. The bug is reported in dotnet, without any response yet: dotnet/runtime#96385
The interpreter is broken, it causes problems in #1742. The bug is reported in dotnet, without any response yet: dotnet/runtime#96385
The interpreter is broken, it causes problems in #1742. The bug is reported in dotnet, without any response yet: dotnet/runtime#96385
I have to add tests here. |
b974849
to
6d676be
Compare
In command bindings, expressions get automatically wrapped in a lambda function. Surprisingly, the behavior was also present in value/resource, which lead to some surprising effects when value/resource was accidentally assigned to a command property (#1742). We also unify that untyped ICommandBinding and IStaticCommandBinding produce delegate of type Command (i.e. async function with no argument and no return value). Previously Delegate was used for commands, which had the effect of sending the return value to the client
We found a strange bug - probably caused by missing validation of delegates passed to DotVVM properties.
I've added a repro
/FeatureSamples/MarkupControl/CommandAsPropertyPage
but I cannot find the place where to fix it.