Skip to content

Events and Handlers

The Data Table component has the following events and handlers available for use:

Events

Event
Description
On Before Mount
Triggers immediately before the component is mounted and appeared on the page.
On Mounted
Triggers immediately after the component is mounted and appeared on the page.
On Before Unmount
Triggers immediately before the component is unmounted and destroyed. Perform any necessary cleanup in this method, such as invalidating timers or cleaning up any RT subscriptions that were created in the component.
On Visibility Change
Gets activated when the visibility state of the component is altered. You can use this event to define actions that need to take place when the component becomes visible or hidden.
On Record Selected
Triggers when the user selects a record in the table. The selected record is provided as a context block.
On Records Request
The handler should return an object with property 'count' that is equal to the count of loaded objects and 'items' that should be an array of objects with the same structure as the selected table.
On Record Created
Triggers when a new record(object) is created in the Data Table. THe new object is provided as a context block for the event handler.
On Object Update
Triggers when a record(object) is edited in the Data Table. The event handler receives both old version of the object and the new (modified) version of it.
On Object Delete
Triggers when a record (object) is deleted from the Data Table. The event handler receives the object being deleted in a context block.

Handlers

Handler
Description
Class List Logic
This logic involves modifying the CSS classes associated with the component dynamically.
Styles Logic
Allows you to change the styles of the component dynamically.
Visibility Logic
Allows controlling the visibility of the component based on certain conditions. You can use this event to show or hide the component depending on user actions or other factors. If the handler returns true, the component will be visible.
Title Logic
Sets the title for the Data Table.
Table Name Logic
Determines the name of the table which the Data Table works with.
Where Clause Logic
Determines the where clause used to fetch data from the table.
Search Enabled Logic
Controls the visibility of the search bar in the data table. When the handler returns true, the search bar is enabled.
Sorting Enabled Logic
Controls whether sorting is enabled in the data table. When the handler returns the true, then the sorting is enabled.
Filtering Enabled Logic
Controls whether filtering is enabled in the data table. When the handler returns true, filtering is enabled.
Paging Control Logic
Controls whether paging is enabled in the data table. When the handler returns true, paging is enabled.
Real Time Control Logic
Controls whether real-time data synchronization with the server is enabled in the data table. When the handler returns true, real-time data synchronization is enabled.
Enable New Item Logic
Controls whether adding new items in the data table is allowed. When the handler returns true, the data table displays an icon which enabled new item creation.
Enable Editing Logic
Controls whether editing in the data table is allowed. When the handler returns true, data table records can be edited inside of the component.
Enable Deletion Logic
Controls whether deletion in the data table is allowed. When the handler returns true, data table records can be deleted afterwards.
Columns Logic
Controls what columns are displayed by the data table.