Progress Button OnClick Lambda

Hello,

Can you use lambda with the OnClick?

I'm trying to do this:

<SfProgressButton OnClick="@(async (e) => await RemoveUser(user.id))" Content="Revoke Access">                          </SfProgressButton>

And RemoveUser is called but the button's spinner doesn't appear. What am I missing?

Thanks,

Alan


1 Reply

GK Gayathri KarunaiAnandam Syncfusion Team June 24, 2021 03:21 PM UTC

Hi Alan, 

We have checked your reported query. We are unable to replicate the reported issue. We have prepared a sample based on your code snippet. Please check the below sample. 

 
<SfProgressButton Content="Revoke Access" OnClick="@(async (e) => await RemoveUser("Revoke"))"></SfProgressButton> 
<p>@Content</p> 
@code{ 
    public string Content; 
    public async Task RemoveUser(string id) 
    { 
         
        Content = "Button Clicked"; 
         
    } 
} 
 


If you are still facing the issue, kindly share the below details. 

·        If possible, try to reproduce the reported issue in provided sample or share the issue reproducible sample.  
·        If possible, please share the video of the issue. 
·        Please share the Syncfusion version you are using. 

Please provide the above requested information, based on that we will check and provide you a better solution quickly. 

Regards, 
Gayathri K 


Loader.
Up arrow icon