How do I call a method from a static context within a renderfragment Blazor
I have this renderfragment that I am assigning as a menu and I need to be able to clear the list from within this renderfragment and I can’t seem to get it to work. I have tried event callbacks, actions, delagates and everytime I run into this error: Keyword ‘this’ is not available in the current context. I also cannot pass any parameters through the builder it gives me this error: Cannot convert initializer type ‘lambda expression’ to target type ‘Microsoft.AspNetCore.Components.RenderFragment’. So how can I clear this list in this context? The problem is within the button: ClearListAction(). This also doesnt work: OnCLick=(() => webhookList.Clear()) I get the same error about ‘this’.
How do I call a method from a static context within a renderfragment
I have this renderfragment that I am assigning as a menu and I need to be able to clear the list from within this renderfragment and I can’t seem to get it to work. I have tried event callbacks, actions, delagates and everytime I run into this error: Keyword ‘this’ is not available in the current context. I also cannot pass any parameters through the builder it gives me this error: Cannot convert initializer type ‘lambda expression’ to target type ‘Microsoft.AspNetCore.Components.RenderFragment’. So how can I clear this list in this context? The problem is within the button: ClearListAction(). This also doesnt work: OnCLick=(() => webhookList.Clear()) I get the same error about ‘this’.