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

# DashboardStoreAccessor

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: class
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/model/store/storeAccessors/DashboardStoreAccessor.ts

This class serves the selector and the dispatcher properties of the dashboard component state.

**Signature:**

```typescript
export declare class DashboardStoreAccessor 
```

## Remarks

The [Dashboard()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboard/index.md) component has an optional property  through which you can handle set the values for [DashboardDispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboarddispatch/index.md) and [DashboardSelectorEvaluator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardselectorevaluator/index.md).

In your component using [Dashboard()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboard/index.md) you can create and instance of the [DashboardStoreAccessor](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md) object and use it like in the example below. The example shows the accessor's usage as well. There is a need to check the select and dispatch object existence.

See [DashboardStoreAccessorRepository](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessorrepository/index.md) on possible way how to use the store accessor.

To get latest properties, use static member function . If there is already an instance created, it will return this instance and will return new instance of the [DashboardStoreAccessor](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md) otherwise.

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [dispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md#dashboardstoreaccessordispatch) |  | [DashboardDispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboarddispatch/index.md) \| undefined |  |
| [getDashboardDispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md#dashboardstoreaccessorgetdashboarddispatch) |  | () =&gt; [DashboardDispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboarddispatch/index.md) | Returns current dispatch object for the dashboard component state. |
| [getDashboardSelect](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md#dashboardstoreaccessorgetdashboardselect) |  | () =&gt; [DashboardSelectorEvaluator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardselectorevaluator/index.md) | Returns current selector for the dashboard's component state. |
| [isDashboardStoreAccessorInitialized](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md#dashboardstoreaccessorisdashboardstoreaccessorinitialized) |  | () =&gt; boolean | Checks if [DashboardStoreAccessor](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md) is fully initialized. |
| [selectorEvaluator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md#dashboardstoreaccessorselectorevaluator) |  | [DashboardSelectorEvaluator](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardselectorevaluator/index.md) \| undefined |  |
| [setSelectAndDispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md#dashboardstoreaccessorsetselectanddispatch) |  | (state: [DashboardState](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstate/index.md), dispatch: [DashboardDispatch](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboarddispatch/index.md)) =&gt; void | Callback to be passed as [Dashboard()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboard/index.md) component property to set and to handle Dashboard component state from outside of the component. |

## Property details

### DashboardStoreAccessor.dispatch

**Signature:**

```typescript
dispatch: DashboardDispatch | undefined;
```

### DashboardStoreAccessor.getDashboardDispatch

Returns current dispatch object for the dashboard component state.

**Signature:**

```typescript
getDashboardDispatch: () => DashboardDispatch;
```

### DashboardStoreAccessor.getDashboardSelect

Returns current selector for the dashboard's component state.

**Signature:**

```typescript
getDashboardSelect: () => DashboardSelectorEvaluator;
```

### DashboardStoreAccessor.isDashboardStoreAccessorInitialized

Checks if [DashboardStoreAccessor](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboardstoreaccessor/index.md) is fully initialized.

**Signature:**

```typescript
isDashboardStoreAccessorInitialized: () => boolean;
```

### DashboardStoreAccessor.selectorEvaluator

**Signature:**

```typescript
selectorEvaluator: DashboardSelectorEvaluator | undefined;
```

### DashboardStoreAccessor.setSelectAndDispatch

Callback to be passed as [Dashboard()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.dashboard/index.md) component  property to set  and  to handle Dashboard component state from outside of the component.

**Signature:**

```typescript
setSelectAndDispatch: (state: DashboardState, dispatch: DashboardDispatch) => void;
```
