Table Select
Last updated
Was this helpful?
Last updated
Was this helpful?
The Table Select is not an Element itself but an example of what can be achieved by using Elements with the templates. This way, it is possible to build tables which contain a special column that allows users to select one or more rows, either with the or the Element.
The following image shows three different tables. The first table shows the use of checkboxes to select rows, positioned to the right side of the table. The second example also shows checkboxes, but they are positioned to the left side. The last table shows buttons positioned to the right.
In the JSON data, you can configure the type
of the Element that will be added to the Table Select and its position
:
Attribute
Type
Required?
Description
type
String
Yes
position
String
Yes
This attribute indicates how the buttons and checkboxes must be aligned inside the column. Accepted values: left
or right
. For more information, refer to the JSON example below.
In this example, the table type
is set as button
and the position
is set as left
.
The table can be generated without header or footer.
If the table type
is equal to "checkbox", then checkboxes will be added to the rows of the table.
A checkbox can also be added in the header. Please note, clicking the checkbox in the header will not check all rows' checkboxes.
If the table type
is equal to "button", then buttons will be added to select a specific row of the table.
The following example shows how to create a Table Select structure using the template and a JSON file.
The type
attribute determines if a table will display a special column with or within it. Note that a table can have only one of the two possible types
, being button or checkbox. For more information, see the Example below.
Note that the template is being used to create the messageML that is rendering the Table.
When creating a MessageML using a template, you must send a JSON file with it.