> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# DashboardLoader

- Package: [@gooddata/sdk-ui-loaders](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/index.md)
- Kind: class
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-loaders/src/dashboard/dashboardLoader.tsx
- Guides: [useDashboardLoader](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/hooks/use-dashboard-loader/index.md)

Default implementation of the [IDashboardLoader](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.idashboardloader/index.md) interface.

**Signature:**

```typescript
export declare class DashboardLoader implements IDashboardLoader 
```
**Implements:** [IDashboardLoader](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.idashboardloader/index.md)

## Remarks

This class implements all the necessary functionality related to either static or dynamic dashboard loading.

Note: you typically do not have to use this class directly and instead use the `useDashboardLoader` hook or the `DashboardStub` component.

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [forDashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderfordashboard) |  | (dashboardRef: [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md)) =&gt; this |  |
| [fromClientWorkspace](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderfromclientworkspace) |  | (clientWorkspace: [IClientWorkspaceIdentifiers](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iclientworkspaceidentifiers/index.md)) =&gt; this |  |
| [fromWorkspace](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderfromworkspace) |  | (workspace: string) =&gt; this |  |
| [load](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderload) |  | (options?: [IDashboardLoadOptions](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.idashboardloadoptions/index.md)) =&gt; Promise&lt;[DashboardLoadResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloadresult/index.md)&gt; |  |
| [onBackend](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderonbackend) |  | (backend: [IAnalyticalBackend](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.ianalyticalbackend/index.md)) =&gt; this |  |
| [withBaseProps](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderwithbaseprops) |  | (props: [IDashboardBasePropsForLoader](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.idashboardbasepropsforloader/index.md)) =&gt; this |  |
| [withEmbeddedPlugins](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderwithembeddedplugins) |  | (...plugins: [IEmbeddedPlugin](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.iembeddedplugin/index.md)[]) =&gt; this |  |
| [withFilterContext](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderwithfiltercontext) |  | (filterContextRef: [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md)) =&gt; this |  |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [adaptive(options)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderadaptive) | `static` | Create loader that may dynamically load dashboard engine and plugins in case a Dashboard to load is using them. |
| [staticOnly()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md#dashboardloaderstaticonly) | `static` | Create loader that will never do any dynamic loading and linking. |

## Property details

### DashboardLoader.forDashboard

**Signature:**

```typescript
forDashboard: (dashboardRef: ObjRef) => this;
```

### DashboardLoader.fromClientWorkspace

**Signature:**

```typescript
fromClientWorkspace: (clientWorkspace: IClientWorkspaceIdentifiers) => this;
```

### DashboardLoader.fromWorkspace

**Signature:**

```typescript
fromWorkspace: (workspace: string) => this;
```

### DashboardLoader.load

**Signature:**

```typescript
load: (options?: IDashboardLoadOptions) => Promise<DashboardLoadResult>;
```

### DashboardLoader.onBackend

**Signature:**

```typescript
onBackend: (backend: IAnalyticalBackend) => this;
```

### DashboardLoader.withBaseProps

**Signature:**

```typescript
withBaseProps: (props: IDashboardBasePropsForLoader) => this;
```

### DashboardLoader.withEmbeddedPlugins

**Signature:**

```typescript
withEmbeddedPlugins: (...plugins: IEmbeddedPlugin[]) => this;
```

### DashboardLoader.withFilterContext

**Signature:**

```typescript
withFilterContext: (filterContextRef: ObjRef) => this;
```

## Method details

### DashboardLoader.adaptive()

Create loader that may dynamically load dashboard engine and plugins in case a Dashboard to load is using them.

**Signature:**

```typescript
static adaptive(options: AdaptiveLoadOptions): DashboardLoader;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| options | [AdaptiveLoadOptions](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.adaptiveloadoptions/index.md) | options for the adaptive load |

**Returns:**

[DashboardLoader](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md)

#### Remarks

Otherwise it will fall back to the dashboard engine statically linked to the context and will only use locally embedded plugins.

### DashboardLoader.staticOnly()

Create loader that will never do any dynamic loading and linking.

**Signature:**

```typescript
static staticOnly(): DashboardLoader;
```
**Returns:**

[DashboardLoader](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-loaders/sdk-ui-loaders.dashboardloader/index.md)

#### Remarks

The loader will expect that the dashboard engine is statically linked in the context. Any plugins that require dynamic loading from remote locations will be ignored. Only locally embedded plugins will be used.
