Skip to content

Table

Tables are components that display tabular data. A table consists of a body, the table, and column components, the table columns. Table columns can be added/removed at will from the table properties.

Property

NoItemInput ValueDefault ValueAction PropertyTypeAction Default ValueDescription
1IDStringAuto-generatedidstringAuto-generatedThe [id] property cannot be set by actions.
2WidthNumber565widthnumber565Component width
3HeightNumber230heightnumber230Component height
4XNumberxnumberX coordinate position
5YNumberynumberY coordinate position
6ColorString
Color Picker
colorstringComponent color
7Background ColorString
Color Picker
backgroundColorstringBackground color
8PaginationBooleanOFFpaginationbooleanfalseEnable/disable pagination function
9SelectingBooleanOFFselectingbooleanfalseEnable/disable row selection function
10Sticky HeaderBooleanONstickyHeaderbooleantrueFixed header display
11VisibilityBooleanONvisibilitybooleantrueComponent show/hide
12Label ColorString
Color Picker
labelColorstringLabel text color
13Header ColorString
Color Picker
headerColorstringHeader background color
14Header Row HeightNumber56headerRowHeightnumber56Header row height
15Header Font SizeNumber14headerFontSizenumber14Header font size
16Header Word WrapSelection
1. Normal
2. OFF
OFFheaderWordWrapstringoffHeader text wrapping setting
17Row Word WrapSelection
1. Normal
2. OFF
OFFrowWordWrapstringoffRow text wrapping setting
18Even Background ColorString
Color Picker
evenBackgroundColorstringEven row background color
Added in "v3.3.0"
19Odd Background ColorString
Color Picker
oddBackgroundColorstringOdd row background color
Added in "v3.3.0"
20Row StyleJSON
[Detail 4]
[]rowStylearray of object[]Style specification for each row
Added in "v3.3.0"
21Cell StyleJSON
[Detail 4]
[]cellStylearray of object[]Style specification for each cell
Added in "v3.3.0"
22Page SizeNumber100pageSizenumber100Number of rows displayed per page
23ValueTable
[Detail 1]
valuearray of objectTable value
24Selectedselectedobject, or array of objectData of selected rows

[Details 1] Value (value)

Gets or sets the value of the entire table. The format of the value is an array of objects representing rows.
The default status is registered as follows.
Register each row from the [Add Row] button.
To delete, select the check box and click the “Delete” button.

monthcompany Acompany Bcompany Ccompany D
0220527234
035339055
0455308166
0530116222

When handling data in an action, data can be displayed in a table by setting the value (value) in the form of an array of objects, as in the following example. Similarly, the value (value) contains the current state of the displayed data in the table in the form of an array of objects.

[
{"month":"02","companyA":20,"companyB":52,"companyC":72,"companyD":34},
{"month":"03","companyA":5,"companyB":33,"companyC":90,"companyD":55},
{"month":"04","companyA":55,"companyB":30,"companyC":81,"companyD":66},
{"month":"05","companyA":30,"companyB":11,"companyC":62,"companyD":22}
]

[Details 2] To get the clicked rows from the table column action

In table column actions, the row where the event occurs can be retrieved by the selected property. The selected value (selected) is a property that allows you to retrieve the row data selected in the table. On the click event (onclick) of a table column, a row object array with 1 element can be obtained using the selected property.

[Details 3] To get the selected rows from an action outside the table

If the "selecting" property is set to ON, the left-most column will have a selection checkbox. Row data with the row selection checkbox turned on can be retrieved from an action outside the table by means of the selected value (selected) property. The acquisition data format is an array of objects.

[Detail 4] Table Style

By using the following properties, you can apply styles to even rows, odd rows, and each row and cell.
Additionally, by combining with actions, you can implement behaviors such as changing styles only under specific conditions.

  • "Even Background Color"
  • "Odd Background Color"
  • "Row Style"
  • "Cell Style"

How to set Even Background Color/Odd Background Color

For even row background color/odd row background color, specify the background color using a string or color picker.
When setting with an action, set the background color as a string to the "evenBackgroundColor"/"oddBackgroundColor" action properties.

$ui.<TableID>.evenBackgroundColor = "red";
$ui.<TableID>.oddBackgroundColor = "#039BE5";

How to set Row Style/Cell Style

For row style/cell style, set the style in JSON format as follows.

Row Style:

[
{"row": "0", "backgroundColor": "blue"},
{"row": "1", "backgroundColor": "#ffffffff"}
]

Cell Style:

[
{"row": "0", "column": "month", "backgroundColor": "blue", "color": "white"},
{"row": "1", "column": "companyA", "backgroundColor": "#ffffff", "color": "#039BE5"}
]

When setting with an action, set the style as an object array to the "rowStyle"/"cellStyle" action properties.

$ui.<TableID>.rowStyle = [
{row: 0, backgroundColor: "blue"},
{row: 1, backgroundColor: "#ffffffff"}
];
$ui.<TableID>.cellStyle = [
{ row: 0, column: "month", backgroundColor: "blue", color: "white"},
{ row: 1, column: "companyA", backgroundColor: "#ffffff", color: "#039BE5"}
];

The object properties are as follows:

TargetObject PropertyDescription
rowStylerow1. Specify the row to set the style as a number or string
2. The first row is treated as row 0
backgroundColor1. Table row background color
2. Specify by color name or 6-digit (8-digit) code
cellStylerow1. Specify the row of the cell to set the style as a number or string
2. The first row is treated as row 0
column1. Specify the column of the cell to set the style by column ID
color1. Table cell text color
2. Specify by color name or 6-digit (8-digit) code
backgroundColor1. Table cell background color
2. Specify by color name or 6-digit (8-digit) code

How to clear the set styles

TargetValue to SetResult
evenBackgroundColor and oddBackgroundColorOne of the following values:
1. null
2. ""
evenBackgroundColor and oddBackgroundColor are cleared, and the even and odd row background colors set in the table disappear.
rowStyle and cellStyleOne of the following values:
1. []
2. null
3. ""
rowStyle and cellStyle are cleared, and the row styles and cell styles set in the table disappear.

Event

None