Skip to content

Commit

Permalink
add documentation for object readyState and hideLoadImage (#60)
Browse files Browse the repository at this point in the history
* add documentation for object readyState and hideLoadImage
  • Loading branch information
eheckel authored Jan 16, 2024
1 parent 10a1e5e commit 7158a6d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sdk/va-report-components/documentation/docs/api/ObjectHandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ When a report element is assigned new attribute values or removed from the DOM,
any `ObjectHandles` obtained from that element are invalidated and should be
discarded.

## Properties

### readyState: string
The ready state of the report object. When this value changes, a `readyStateChanged` event is fired on the ObjectHandle.

This value can be one of the following:
- `"contentLoading"` when the report object is still loading its content.
- `"complete"` when the report object has finished loading.
- `"error"` when the report object encountered an error and could not load.

## Methods

### exportData(format: string, options?: ExportDataOptions): Promise\<string>
Expand Down Expand Up @@ -83,6 +93,7 @@ Adds an event listener to the `ObjectHandle` to call the supplied listener when

`eventType` is a string that represents the event type to listen for. These event types are supported:
- `"selectionChanged"` for listening for selection changes in the object.
- `"readyStateChanged"` for listening to changes on the `readyState` property.

`listener` is an event listener callback function. When the event occurs, `listener` is called and passed an event object containing the following properties:
- `type` is a string that matches the event type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ default value: `true`
default value: `undefined`<br>
default behavior: use a shared report context per report

### `hideLoadImage: boolean`

When `false`, report objects display a placeholder static image of the report object while it is loading. `true` hides this placeholder and displays a loading indicator.

default value: `false`


## Properties

Expand Down

0 comments on commit 7158a6d

Please sign in to comment.