Skip to content

Commit 43f516e

Browse files
Embed event example update (#28)
1 parent c6f1528 commit 43f516e

File tree

2 files changed

+286
-262
lines changed

2 files changed

+286
-262
lines changed

src/types.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,26 @@ export interface RuntimeParameter {
12641264
* console.log('Drilldown event', drilldown);
12651265
* }));
12661266
* ```
1267+
*
1268+
* If using React components to embed, use `on<EventName>` to register event listeners.
1269+
*
1270+
* @example
1271+
* ```js
1272+
* // ...
1273+
* const MyComponent = ({ dataSources }) => {
1274+
* const onLoad = () => {
1275+
* console.log(EmbedEvent.Load, {});
1276+
* };
1277+
*
1278+
* return (
1279+
* <SearchEmbed
1280+
* dataSources={dataSources}
1281+
* onLoad = {logEvent("Load")}
1282+
* />
1283+
* );
1284+
* };
1285+
* ```
1286+
*
12671287
* @group Events
12681288
*/
12691289
// eslint-disable-next-line no-shadow

0 commit comments

Comments
 (0)