Closed grumpykiwi closed 1 year ago
@grumpykiwi I recommend to use ValueTask
instead of Task
, like the following code.
protected async ValueTask ProcessHotKey()
{
await ShowSearchModal();
}
If you have to use Task
, you can do that with the following code.
this.HotKeysContext = this.HotKeys.CreateContext()
.Add(ModCode.Ctrl|ModCode.Shift, Code.W, async () => await ProcessHotKey(), "Process HotKey");
I have upgraded to the new version of nuget package at Visual Studio recommendation and now have a bit of an issue with the code
Does this library support Blazor Server now ?
My callback function to handle the hotkeys needs to call an async function in order to display a modal dialog. How do I modify the call to CreateContext to avoid a compiler error. Here is the code:
I get "Argument 3 cannot convert from method group to string
Here is the method: