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

# IWithLoadingEvents

- Package: [@gooddata/sdk-ui](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/index.md)
- Kind: interface
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui/src/execution/withExecutionLoading.tsx

**Signature:**

```typescript
export interface IWithLoadingEvents<TProps> 
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [onError?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iwithloadingevents/index.md#iwithloadingeventsonerror) |  | (error: [GoodDataSdkError](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.gooddatasdkerror/index.md), props: TProps) =&gt; void | _(Optional)_ If specified, this function will be called in case loading runs into an error. |
| [onExportReady?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iwithloadingevents/index.md#iwithloadingeventsonexportready) |  | (exportFunction: [IExportFunction](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iexportfunction/index.md), props: TProps) =&gt; void | _(Optional)_ Called when loading finishes and it is possible to export the underlying data. Function that does the export will be provided on the callback. |
| [onLoadingChanged?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iwithloadingevents/index.md#iwithloadingeventsonloadingchanged) |  | (isLoading: boolean, props: TProps) =&gt; void | _(Optional)_ Called when loading starts and finishes, indicating the current state using the `isLoading` parameter. |
| [onLoadingFinish?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iwithloadingevents/index.md#iwithloadingeventsonloadingfinish) |  | (result: [DataViewFacade](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.dataviewfacade/index.md), props: TProps) =&gt; void | _(Optional)_ Called when loading finishes. |
| [onLoadingStart?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iwithloadingevents/index.md#iwithloadingeventsonloadingstart) |  | (props: TProps) =&gt; void | _(Optional)_ Called when loading starts. |

## Property details

### IWithLoadingEvents.onError

If specified, this function will be called in case loading runs into an error.

**Signature:**

```typescript
onError?: (error: GoodDataSdkError, props: TProps) => void;
```

### IWithLoadingEvents.onExportReady

Called when loading finishes and it is possible to export the underlying data. Function that does the export will be provided on the callback.

**Signature:**

```typescript
onExportReady?: (exportFunction: IExportFunction, props: TProps) => void;
```

### IWithLoadingEvents.onLoadingChanged

Called when loading starts and finishes, indicating the current state using the `isLoading` parameter.

**Signature:**

```typescript
onLoadingChanged?: (isLoading: boolean, props: TProps) => void;
```

### IWithLoadingEvents.onLoadingFinish

Called when loading finishes.

**Signature:**

```typescript
onLoadingFinish?: (result: DataViewFacade, props: TProps) => void;
```

### IWithLoadingEvents.onLoadingStart

Called when loading starts.

**Signature:**

```typescript
onLoadingStart?: (props: TProps) => void;
```
