Passing object as parameter to component fails with implicit operator #5632
Labels
affected-very-few
This issue impacts very few customers
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
feature-blazor-component-model
Any feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
severity-major
This label is used by an internal tool
Status: Resolved
Milestone
Consider the following code:
I have a component for rendering a
StringField
in the UI that simplified looks like this:In my main page I operate on a collection of
IField
objects. Trying to invoke the component like this fails as runtime. This has worked fine for all previous components that didn't have the implicit operator.However changing the component to this and passing the param as an
IField
works just fine but is a bit messy.It looks like the implicit operator converts the param before trying to set it in runtime making the app break.
The text was updated successfully, but these errors were encountered: