Displaying Progress Indicators

Summary

  • AdapTable makes it possible to display a Progress Indicator during a long-running operation

AdapTable allows developers to create Progress Indicators when an operation takes a significant time to run.

Find Out More

It is also possible to display Custom Window Popups to display more general information

Developers can either simply provide the text to display and use AdapTable's default rendering, or can provide custom rendering which will be used instead.

Show and hide Progress Indicators via User Interface API:

  • showProgressIndicator — displays the indicator (default or custom rendering)
  • hideProgressIndicator — closes the indicator
Deep Dive

Configuring the Progress Indicator

Developer Guide

Providing a Progress Indicator

const config: ProgressIndicatorConfig = {
  text: 'This standard Progress Indicator will display for 5 seconds',
};
1
Standard indicator (text only)

Provide text on ProgressIndicatorConfig for AdapTable's default spinner and message. Omit render and frameworkComponent.

const config: ProgressIndicatorConfig = {
  text: 'Custom Indicator',
  render: () =>
    '<div style="padding:10px"><b>Custom progress content</b></div>',
};

const dialogConfig: ProgressIndicatorConfig = {
  text: 'New Dialog',
  renderMode: 'dialog',
  render: () =>
    '<div style="padding:10px"><b>Fully custom dialog content</b></div>',
};
2
Custom HTML with `render`

Supply a render function that returns HTML. It receives CustomRenderContext when you need lifecycle hooks (phase, element, adaptableApi).

  • renderMode: 'content' (default) — custom HTML appears inside AdapTable's progress dialog together with the spinner
  • renderMode: 'dialog' — your HTML replaces the default dialog entirely

Optional delay (milliseconds) defers showing the indicator until the operation has run for that long.

onClick: (button, context) => {
  context.adaptableApi.userInterfaceApi.showProgressIndicator(config);
},
3
Show from application code

Call showProgressIndicator wherever you have adaptableApi — for example a Custom Toolbar Button onClick handler.

setTimeout(() => {
  context.adaptableApi.userInterfaceApi.hideProgressIndicator();
}, 5000);
4
Hide when the operation completes

Call hideProgressIndicator when the long-running task finishes (the demo uses a 5-second timeout).

Displaying a Progress Indicator
Fork
  • This example contains 3 Custom Toolbar Buttons that each open a Progress Indicator:
    • Show Standard Progress Indicator - displays the text it is given and uses the default AdapTable rendering
    • Show Custom Progress Indicator - displays using custom rendering that was supplied
    • Show New Dialog Indicator - displays using a replacement Dialog
  • All 3 Progress Indicators display for 5 seconds (before being hidden via hideProgressIndicator)
Try It Out
  • Click the 3 toolbar buttons to see the associated Progress Indicators