0

I was curious to see new .net 7 Blazor binding syntax in action and tried to replace @onchange="@(code => OnCodeChanged(code, r.ServiceId))" with bind:after but I couldn't find a way to pass it ServiceId which I need to properly identify entity which is being updated.

Is there a way to pass arbitrary parameters to bind:after or bind:set?

Milan
  • 969
  • 2
  • 16
  • 34

1 Answers1

1

You can do:

@bind-value:set="(value) => this.OnChange(value, 1)"

but you can't do the same with @bind-value:after because of the way it's implemented.

See this answer to a recent question which goes into a little more detail and the current issues with the bind setup in Net7.0 - https://stackoverflow.com/a/75277308/13065781.

MrC aka Shaun Curtis
  • 19,075
  • 3
  • 13
  • 31