Skip to main content

The Event List web component

Properties

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

dateFormat

The displayed date format.

Type string
Configurability Inspector
Defaultnull

events

A list of configured event handlers that trigger actions or queries.

Type array
Array values object
Configurability Inspector > Interaction > Event handlers
Defaultnull
Array Object Properties

event

The event that triggers the action. Refer to the events section for details of available events for this object.

Type string
Configurability Inspector > Interaction > Event handlers > Event
Defaultnull

method

The JavaScript method to perform when type is datasource, widget, state, or localStorage.

Type string
Configurability Inspector > Interaction > Event handlers > Edit event handler > Run script actions
Defaultnull

type

The type of action to perform.

Type string
Configurability Inspector > Interaction > Event handlers > Edit event handler > Action
Allowed Values
ValueDescription
datasource

Control query.

widget

Control component.

script

Run script.

state

Set variable.

localStorage

Set localStorage.

util

Perform utility action (e.g., Open URL or Confetti).

Defaultnull


groupBy

The grouping option when isGrouped is true.

Type string
Configurability Read-only
Allowed Values
ValueDescription
day

Group items by day.

none

Disable grouping.

Defaultnull

id

The unique identifier (name).

Type string
Format Plain Text
Configurability Inspector
DefaulteventList1
Examples
query1
button1

isGrouped

Whether to group items.

Type boolean
Configurability Read-only
Defaultnull

items

The items in the Event List.

Type array
Format Plain Text
Array values string
Configurability Inspector > Content > Items
Defaultnull

pending

The label to display for pending items when isGrouped is false.

Type string
Configurability Read-only
Defaultnull

renderAsHtml

Whether to render the text as HTML.

Type boolean
Configurability Read-only
Defaultnull

sortedDesc

Whether to sort items in descending order when isGrouped is true.

Type boolean
Configurability Read-only
Defaultnull

timeFormat

The format of the time.

Type string
Configurability Inspector
Defaultnull

timestamps

A list of timestamps for each item when isGrouped is true.

Type array
Array values string
Configurability Read-only
Defaultnull

Methods

JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

eventList.scrollIntoView()

Scrolls the canvas or parent container so that the selected component appears in the visible area.

Definition
eventList.scrollIntoView(options)
Parameters

options

The scroll options.

Type object
Object Properties

behavior

The scroll behavior.

Type string
Allowed Values
ValueDescription
auto

Scroll immediately to the specified position.

smooth

Scroll gradually to the specified position.


block

The scroll position relative to the component.

Type string
Allowed Values
ValueDescription
nearest

Scrolls only the minimum amount required for the component to appear in the visible area. Scrolling does not occur if the component is already in view.

start

Scrolls to position the component at the top of the visible area.

center

Scrolls to position the component in the middle of the visible area.

end

Scrolls to position the component at the bottom of the visible area.



Examples

Scroll the minimum amount to immediately bring eventList into view.

eventList.scrollIntoView({behavior: 'auto', block: 'nearest'});

eventList.setHidden()

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
eventList.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide eventList.

eventList.setHidden(true);

Unhide eventList.

eventList.setHidden(false);

Events

Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.

EventDescription
ClickAn item is clicked or pressed.