New to KendoReact? Start a free 30-day trial
DatAInsights Composer Events
DatAInsights Composer EventsPremium
Updated on Nov 4, 2026
The KendoReact DatAInsights Composer raises events for the prompt, the generated visualizations, the History, and its lifecycle state. The events notify your app about what happened. None of them is cancelable, and only onDataProcess uses the value that you return from the handler.
The following list describes when each event fires. For the arguments of each event, see the API reference.
Prompt and Generation
onPromptChange—Fires on every keystroke in the prompt or in the refine prompt.onPromptSubmit—Fires on every prompt submission, including refinements. Without anaiClient, handle it to run the request yourself.onPromptCancel—Fires when a pending request is abandoned, for example, when the user clicks Stop.onStateChange—Fires after every state transition.onError—Fires when an AI client call or the data processing fails, or when a visualization cannot be rendered. A request that the AI declines is not an error.
Datasets and Data
onDatasetResolve—Fires when the AI selects a dataset and the component has no active one. See multiple datasets.onDataProcess—Fires when the data of the visualization is available and when the configuration or the data changes. Return the rows to display, orundefinedto keep the built-in processing.
Visualizations
onConfigChange—Fires whenever the component produces a valid set of configurations. In controlled mode, pass the new values back through theconfigsproperty.onEditingChange—Fires when the component opens or closes the edit mode.onConfirm—Fires when the user clicks Confirm. Use it to persist the visualization.onDiscard—Fires when the user clicks Discard and the component restores the configurations from the start of the edit mode. If the restored configurations differ from the displayed ones,onConfigChangealso fires with thediscardorigin.onRemove—Fires when the user clicks Remove.onConfigChangefires after it with theremoveorigin and empty values. Whenconfigsis controlled, clear them in the handler.
History
onHistoryItemCreate—Fires after a successful generation or refinement adds a History item.onHistoryItemRestore—Fires when the user restores a History item.
The following example handles the component events and logs them. Generate a visualization, refine it, restore a History item, and confirm or discard the changes to see the order in which the events fire. The first prompt also resolves the dataset, because the example has two datasets and no active one.
Loading ...