Events#

The event catalog. Every widget announces what it does as a named event; data-carrying events hand the handler a typed payload, while native events hand it a curated, toolkit-free Event. This module is the home of all of those types, so editors can autocomplete the attributes on each one.

For a task-oriented introduction — listening, reading a payload, cancelling a subscription, emitting your own — see the Events guide.

Event handling#

The curated event handed to native handlers and the cancellable handle returned by every binding.

Event

The object a handler receives for native and context events.

Subscription

Handle returned by widget.on(...).

Value and input payloads#

Handed to handlers for value commits, live input, validation, and toggles.

ChangeEvent

Fires when a field's value is committed (on blur or Enter).

InputEvent

Fires on every keystroke, before the value is committed.

ValidationEvent

Fires after validation runs — valid, invalid, and validate.

TextModifiedEvent

Fires when a text area's modified (dirty) flag changes.

ToggleEvent

Fires when an expander is expanded or collapsed.

Slider payloads#

The live and committed payloads for the single- and range-value sliders.

SliderEvent

Fires while a slider (or gauge/meter) value moves.

SliderCommitEvent

Fires when a slider value is committed (drag released or stepped).

RangeSliderEvent

Fires while either handle of a range slider moves.

RangeSliderCommitEvent

Fires when a range slider's values are committed.

Date payloads#

DateSelectEvent

Fires when a date (or date range) is chosen in a calendar.

Tab payloads#

The change/activate/deactivate/close payloads for a tab strip.

TabChangeEvent

Fires when the active tab changes.

TabActivateEvent

Fires when a tab becomes active.

TabDeactivateEvent

Fires when a tab stops being active.

TabCloseEvent

Fires when a tab's close button is used.

Data and selection payloads#

Row CRUD, selection, export, tree selection, button-group clicks, menu selection, and the data-source change broadcast.

RowEvent

Fires for a single-row action (click, double-click, right-click).

RowsEvent

Fires for a multi-row action (insert, update, delete, move).

SelectionEvent

Fires when the set of selected rows changes.

TreeSelectionEvent

Fires when a tree's set of selected nodes changes.

ExportEvent

Fires after the table's data is exported (copied or saved).

ButtonGroupClickEvent

Fires when a button in a button group is clicked.

MenuSelectEvent

Fires when a menu item is activated (MenuButton / ContextMenu).

DataChangeEvent

Broadcast by a data source when its data or view changes.

Picture and media payloads#

The load and error events fired by Picture as it decodes and displays an image.

ImageLoadEvent

Fires when a Picture has decoded its source and displayed it.

ImageErrorEvent

Fires when a Picture fails to load or decode its source.

Supporting types#

Value types carried inside payloads, rather than handed to a handler directly.

TabRef

Identifies a tab by key and display text.

Enumerations#

The string-literal tags carried by the change and data-change payloads.

type bootstack.events.ChangeKind#

What a data-source change describes — 'load', 'insert', 'update', 'delete', 'move', 'filter', 'sort', 'reload', 'select'.

type bootstack.events.ChangeMethod#

How a change was made — 'click', 'key', 'programmatic', 'unknown'.

type bootstack.events.ChangeReason#

Why a change event fired — 'user', 'api', 'hide', 'forget', 'unknown'.