This component displays a loading image while the SDK is waiting for results after a search has been done. This loading image is removed after the results are retrieved.

This component must be linked with a search Store, since it listens to its events to check if the SDK has a search in process.


This is how you create this component:

sdk.component('loader', target: HTMLElement|String);


This component does not track any event.

Example using results component Store through method linkTo

<div id="results"></div>
<div id="loader"></div>

  var results = sdk.component('results', '#results');
  var loader = sdk.component('loader', '#loader');

In this example, the loader component listens to the Store events of the results component.