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.
<div id="results"></div> <div id="loader"></div> <script> var results = sdk.component('results', '#results'); var loader = sdk.component('loader', '#loader'); results.linkTo(loader); </script>
In this example, the
loader component listens to the Store events of the