Table
Table component is used for displaying data in a tabular form (rows & columns).
Example
API Methods
setData
Sets the data in the particular array of objects.
- Method
- Usage
setData(data: TableData[]): void
a8forms.Table("tableId").setData([
{
id: 1,
Name: "John",
Age: 23,
},
{
id: 2,
Name: "Mike",
Age: 56,
},
]);
setSize
Sets the size only using the parameters passed in.
- Method
- Usage
setSize(size: "small" | "medium" | "large"): void
//Sets the size of the Checkbox to small
a8forms.Table("tableId").setSize("small")
//Sets the size of the Checkbox to medium
a8forms.Table("tableId").setSize("medium")
//Sets the size of the Checkbox to large
a8forms.Table("tableId").setSize("large")
setVisibility
Sets the elements of the given category to visible in this view.
- Method
- Usage
setVisibility(visible: boolean): void
// Setting the visibility to "true" makes the element visible
a8forms.Table("tableId").setVisibility(true)
// Setting the visibility to "false" makes the element invisible
a8forms.Table("tableId").setVisibility(false)
setVisibilityCondition
Sets the hide condition
- Method
- Usage
setVisibilityCondition(condition: string): void
// Sets a condition for changing the element's visibility status.
a8forms.Table("tableId").setVisibilityCondition("1 == 1");