This component contains the following widgets:
All these widgets show a spinner after being clicked.
The LoadingButton and LoadingButtonAsync buttons also show a 'loading text' and become disabled when clicked, preventing double-submit problems and giving the user an indication that the action is running (and he should wait).
All widgets are really simple to use and can be used as drop-in replacements for the standard Button and Link widgets.
LoadingButton
The simplest drop-in replacement for Button, and best in most cases. It works like a regular button, but disables the button and shows a spinner while the OnClick action is running. After the OnClick action is finished the button is enabled and the standard button text is shown again. Both button text and loading text are customizable.
LoadingButtonAsync
Similar to LoadingButton, and can be used in special, more rare, cases where you want the spinner in the button to be shown until a certain async event happens. You pass a boolean variable IsActive to LoadingButtonAsync. The spinner starts when you click the button, but only stops when the IsActive variable becomes false, not directly after the OnClick action is finished.
LoadingButton_OS_Style
Similar to LoadingButton, but uses the standard spinner style from OutSystemsUI. Button is not disabled when spinner is running.
LoadingLink_OS_Style
Similar to LoadingButton_OS_Style, but in the form of a link.
All components are shown in the demo.
OutSystemsUI update (2.14.0)