Set Button's loading property

Hi,
I am trying to indicate a running query through the loader indicator available with buttons. So, in my Javascript I write

buttonSynchronise.loading = true;
buttonSynchronise.loaderPosition = 'Suffix';

...code for triggering queries...

buttonSynchronise.loading = false;

However, the button never shows the loading icon even though the query process in between takes a while to complete.

Is this because loading is a read-only property that can only be changed via a function, such as hidden and disabled? The latter offer corresponding functions, though, which I don't see for the loading property.

Any ideas?

Check out Build a site inspection app on Retool Mobile
" To prevent duplicate inspections, you can disable the button and display a loading state while the query runs. Set the value of Disabled and Loading for this button to {{ createInspection.isFetching }}"

Thanks @ScottR, I agree! You can set this in the component settings, but it's otherwise read-only

Works perfect! Thanks for your help!