Skip to content
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

Migrate from Action to EventCallback #64

Closed
IvanJosipovic opened this issue Jun 20, 2019 · 3 comments
Closed

Migrate from Action to EventCallback #64

IvanJosipovic opened this issue Jun 20, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@IvanJosipovic
Copy link
Contributor

The new guidance is to use EventCallback instead of Action.
See for more details dotnet/aspnetcore#6351

Since Preview 6, the use of Action is also causing the following errors to show up:

System.ArgumentException: Object of type 'Microsoft.AspNetCore.Components.EventCallback`1[Microsoft.AspNetCore.Components.UIMouseEventArgs]' cannot be converted to type 'System.Action`1[Microsoft.AspNetCore.Components.UIMouseEventArgs]'.
   at System.RuntimeType.CheckValue (System.Object value, System.Reflection.Binder binder, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) <0x2778e18 + 0x000c6> in <917eebd1d479468d957d9e8362baba7d>:0 
@chanan
Copy link
Owner

chanan commented Jun 20, 2019

I did change some of them on migration, but didnt do a search on the full project. Doing the rest now.

@chanan chanan added the bug Something isn't working label Jun 20, 2019
@chanan chanan self-assigned this Jun 20, 2019
@IvanJosipovic
Copy link
Contributor Author

I just sent a PR which covers most of the migration.

Not complete:
CarouselIndicators.razor
Modal.razor

Both of these trigger the event within a setter, I can't seem to get this to work with EventCallBack as its async.

@chanan
Copy link
Owner

chanan commented Jun 20, 2019

Fixed those two as well. Will create a new build soon, have a few other fixes to do. Thanks for the PR!

@chanan chanan closed this as completed Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants