i want to loader untill the data fetches from the connector when i click on the button. for me it is showing less than the time that data fetches takes place.
I have a solution for you here in the On-screen actions. You can make use of the Show Screen Loader & Hide Screen Loader actions in the On-screen actions in the action flow of the button click.
Show Screen Loader can be applied before the API call or in the beginning, and then similarly Hide Screen Loader can be applied after the API call. (Pasted a screenshot for you)
Here is the relevant article link.
Show Screen Loader | Build stunning internal tools, blazing fast
Screen loader can also be customized from the app settings. Here is the article that tell you how to do it.
I hope this helps.