Flex Grid Methods
The Flex Grid component navigation can be entirely controlled through the SDK. All of the following methods accept a single object as parameter. This object will always contain at least the componentId of the targeted Flex Grid component, and sometimes will also require an index, which is the index of the tile that receives an action.
Details View
flexGridDetailsViewOpen
Open a tile's details view in the Flex Grid component.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
index | number | Yes | The index of the tile to open in details view. |
Example
window.wyng['_WYNG_ID_'].flexGridDetailsViewOpen({ componentId: 'flex_grid_123', index: 2 });
After calling flexGridDetailsViewOpen, the event individual_entry_expanded is sent. See the event's payload in the Event Listener documentation.
flexGridDetailsViewClose
Close the details view in the Flex Grid component.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridDetailsViewClose({ componentId: 'flex_grid_123' });
flexGridDetailsViewGoRight
Navigate to the next piece of content in the details view of the Flex Grid component.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridDetailsViewGoRight({ componentId: 'flex_grid_123' });
After calling flexGridDetailsViewGoRight, the event individual_entry_expanded is sent. See the event's payload in the Event Listener documentation.
flexGridDetailsViewGoLeft
Navigate to the previous piece of content in the details view of the Flex Grid component.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridDetailsViewGoLeft({ componentId: 'flex_grid_123' });
After calling flexGridDetailsViewGoLeft, the event individual_entry_expanded is sent. See the event's payload in the Event Listener documentation.
Load More Content
flexGridLoadMoreContent
Load additional tiles into the Flex Grid component.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridLoadMoreContent({ componentId: 'flex_grid_123' });
After calling flexGridLoadMoreContent, when new content is loaded and displayed, the event flex_grid_new_content_added is sent. See the event's payload in the Event Listener documentation.
Carousel Navigation
flexGridCarouselGoToNext
Navigate to the next page of tiles in the Flex Grid component's carousel mode.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridCarouselGoToNext({ componentId: 'flex_grid_123' });
flexGridCarouselGoToPrev
Navigate to the previous page of tiles in the Flex Grid component's carousel mode.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridCarouselGoToPrev({ componentId: 'flex_grid_123' });
flexGridCarouselGoToIndex
Navigate to a specific page of tiles in the Flex Grid component's carousel mode.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
index | number | Yes | The index of the target carousel page. |
Example
window.wyng['_WYNG_ID_'].flexGridCarouselGoToIndex({ componentId: 'flex_grid_123', index: 1 });
Spotlight Navigation
flexGridSpotlightGoToNext
Navigate to the next page of tiles in the Flex Grid component's spotlight mode.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridSpotlightGoToNext({ componentId: 'flex_grid_123' });
flexGridSpotlightGoToPrev
Navigate to the previous page of tiles in the Flex Grid component's spotlight mode.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
Example
window.wyng['_WYNG_ID_'].flexGridSpotlightGoToPrev({ componentId: 'flex_grid_123' });
flexGridSpotlightGoToIndex
Navigate to a specific page of tiles in the Flex Grid component's spotlight mode.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
componentId | string | Yes | The component ID of the targeted Flex Grid component. |
index | number | Yes | The index of the target spotlight page. |
Example
window.wyng['_WYNG_ID_'].flexGridSpotlightGoToIndex({ componentId: 'flex_grid_123', index: 1 });