热情的登山鞋 · 快速抽取Oracle数据到Mongo - ...· 5 天前 · |
豪气的地瓜 · 8. 函数 — KingbaseES产品手册· 4 天前 · |
纯真的包子 · Could not commit JPA ...· 4 天前 · |
飘逸的炒饭 · 前后端分离——Vue结合BootStrap与 ...· 2 天前 · |
含蓄的薯片 · 如何在PS里使用stable ...· 12 小时前 · |
难过的牛排 · 李克强:扎实推进"双创"和"中国制造2025 ...· 4 天前 · |
奔跑的煎饼果子 · 广西艺术学院附属中等艺术学校2023年招生简 ...· 1 月前 · |
骑白马的乒乓球 · linux服务器BBR和搭梯子V2安装 – ...· 7 月前 · |
无邪的仙人球 · 英国新无人机方案引关注--军事--人民网· 7 月前 · |
可爱的石榴 · 娱乐大佬漫画 - 抖音· 1 年前 · |
Interaction | Description |
---|---|
Column Resizing | When configured through the designer via the corresponding column config, a column can be resized during runtime. The resize handle exists in a 36px swath centered on the end of the header cell. Hovering over this area will change the mouse cursor to column resizing. Dragging the resize handle will display a resize guide effectively providing a visual for the new column position as the user drags. These changes in width will not persist, and are merely for the convenience of the user. |
Sorting |
When sorting is enabled on a column and the table head is enabled, a sort indicator will display to the right of the header cell content. The sort indicator will display the sort direction.
The following feature is new in Ignition version
8.1.6
Click here to check out the other new features As of 8.1.6 the Table component now sorts columns based on the underlying data type in the column, instead of sorting alphanumerically as if all values were string formatted. |
Selection |
When selection is enabled, a user may select table data based upon the table's selection configuration. In the browser, selection is indicated by a light blue overlay rendered on cells. The root selection, or most recently selected cell has a light blue border. The root selection corresponds with the selected column and selected row propertiess of the table component's selection configuration.
|
Editing |
When editing is enabled on an individual cell, a user can edit a cell by performing the interaction specified by the 'allow edit on' property of the table component. When in edit mode, an editing cell with the corresponding cells content will be presented for edit. To commit this edit, the user must press the return or enter key. To exit the edit, the user may either press the escape key or select another table cell. When an edit is committed, the edited data is sent to the cell edit component event of the Table component. |
Paging |
When paging is enabled, a user may use the provided buttons to navigate between available pages and also jump to a specific page within range.
|
Filtering | When filtering is enabled, a user may filter all of the data, not just the data being displayed when pagers are enabled, of the table component. If paging also happens to be enabled, the table will automatically page jump if it becomes necessary so that it does not display an empty page. |
Coloring/Look |
The table is made up of various subareas (rows, cells, etc). To aid with styling the component, these subareas have dedicated style objects that can be used to change the look. Furthermore, some parts of the table's property model allow for more fine tuned control of the look.
For example, changing the color of all the rows on table can be accomplished by setting a background color on the
|
Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective . This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.
Name | Description | Property Type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Can be a dataset, an array of arrays, or an array of objects. The preferred (recommended) data is either a dataset or an array of objects. Individual data items can be a string, a number, or an object with reserved keys.
Click to see Object data item specifics
Object data items must have a value property. Optionally they can also have properties to indicate the style for the object and whether it is editable. city: { value: 'Folsom', editable: true, style: { backgroundColor: 'grey', classes: [] | '' |
array | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
virtualized |
Enables virtualization of table rows, which is an optimization method that only shows a portion of the underlying data on the chart at a time. While enabled, the table will only be populated with a smaller subset of data: just the visible rows, and a few rows above and below. The idea being the component will be populated with new records as the user scrolls down the listing, assuming there are enough records to necessitate a scrollbar. Enabling virtualization generally results in a performance gain in the session, in cases where the data property is populated with a large amount of content, as the table will only have to "load" a small subset of content. The trade off is that the table will need to load records as the user scrolls, so scrolling quickly may not feel as "smooth" when compared to disabling virtualization. |
value: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
selection |
When Selection is configured, a user will be able to select table data based upon the table's selection configuration. Similar to Vision module, you can select single, single interval, and multiple interval selection modes. The current selection and selection data is written back to the table components property tree. With the exception of the selection data property, the selection properties are bidirectional, meaning that if you were to change the value of the selected column property, it should be reflected in the table component.
Click to see the selection properties
|
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
filter |
Where Table filtering is configured, as well as the filtered data.
Click to see the filter properties
|
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableHeader | When enabled, the table header is displayed including the main table header along with the Header Groups. Default is true. | value: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableFooter | When selected, this enables the table footer, including the main table footer along with the Footer Groups. Default is false. | value: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableHeaderGroups | Enable table header groups if available. Default is false. | value: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enableFooterGroups | Enable table footer groups if available. Default is false. | value: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
headerGroups |
Header Groups are additional headers that are displayed above the main table header. Each header group equates to a single row with individual cells containing title text.
Click to see the headerGroups properties
|
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
footerGroups |
Footer Groups are additional footers that display above the main table footer. Each footer group equates to a single row which consists of individual cells containing title text.
Click to see the footerGroups properties
|
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
columns |
The Columns property allows for granular column-by-column configurations, indicating how each column should be displayed in the table. Column configs enable the you to customize the table component's display and how users will be able to interact with the table in runtime. When a Column Config option is present, the table reflects that custom configuration, such as a single cell of a Table component being changed from a simple value (like a string) to an embedded view. You can add Column Config options by selecting Add Array Element under the Columns property. By default, the Table component displays all available data in columns, however choosing to customize column configuration will reset the table to a single column display. Columns will have to be manually added back into the table using the Add Array Element icon on the right of the Columns property. For examples on how column configurations work, see Table Column Configurations .
Click to see the columns properties
|
array | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dragOrderable |
The following feature is new in Ignition version
8.1.14
When enabled, users may drag column headers to reorder columns in the table if
Column Config
options are present.
Click here to check out the other new features |
value: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sortOrder |
The default weighted order in which columns and their contents are sorted relative to other columns and their contents. Used when the component loads. For sortOrder to be applied, the table must meet the following requirements
Once all columns have been configured, the sortOrder can be configured. Each element in the sortOrder array is expected to be a string value representing the name of the column (as determined by field value in the columns array). For example, sorting by population first, city second, and country last, would look like the following: |
array | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rows |
Configures all rows in the table component. Includes settings for expanding rows into subviews.
Click to see the rows properties
|
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cells |
Configures all cells in the table component.
|
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nullFormat |
The following feature is new in Ignition version
8.1.25
The table null format configuration used when a table contains either a "null" string value or blank cell data.
Can be overridden by individual column nullFormat configuration.
Click here to check out the other new features
|
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pager |
Enables table pagination. Pagination improves performance and appearance on large tables, over 1000 rows.
Click to see the Pager properties.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resizeMode |
Specifies whether the table resize mode is either Fill or Fixed. In Fill resized mode, the total width of all the columns cannot be less than the width of the table. In Fixed resized mode, the total width of all the columns can be less than the width of the table. |
value: boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
style | Sets a style that applies to the component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class . | object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
emptyMessage |
Empty message configuration.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
headerStyle |
The following feature is new in Ignition version
8.1.11
Click here to check out the other new features Sets a style that applies to all column headers. Can be overridden by both columns.style and columns.header.style properties. Full menu of style options is available. You can also specify a style class . |
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
headerGroupStyle |
The following feature is new in Ignition version
8.1.11
Sets a style that applies to all headerGroups. Full menu of
style options
is available. You can also specify a
style class
.
Click here to check out the other new features |
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bodyStyle |
The following feature is new in Ignition version
8.1.11
Sets a style that applies to the table body. Full menu of
style options
is available. You can also specify a
style class
.
Click here to check out the other new features |
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
footerStyle |
The following feature is new in Ignition version
8.1.11
Sets a style that applies to all column footers. Can be overridden by both columns.style and columns.footer.style properties. Full menu of
style options
is available. You can also specify a
style class
.
Click here to check out the other new features |
object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
footerGroupStyle |
The following feature is new in Ignition version
8.1.11
Sets a style that applies to all footerGroups. Full menu of
style options
is available. You can also specify a
style class
.
Click here to check out the other new features |
object |
It is possible to change the styling on rows based upon the value in a row with a Script Transform. For example, if the data property on the table component has a Query binding configured, we can set the Return Format to JSON, and then add a Script Transform:
In the Script Transform, we can add code that adds a styling to each value in the Named Query results:
# Create a new list to store a modified result set from our query newData = [] # Iterate over each row in 'value', which is the original result set for row in value: # Within the row, iterate over each column for col in row: # Create a variable to store the contents of the original "cell" cell = row[col] # Create a dictionary containing the original value, and some styling information row[col] = {"value": cell, "style": {"backgroundColor": "#00FF00"}} # Add the modified row to the list we initialized earlier newData.append(row) #Return the list return newData
You can also change the color of rows in a table when the source of data is a dataset. This approach involves recreating the original data as a new JSON document that contains a style object for each row.
For example, say there's a memory tag set to a dataset type, which contains the following data:
A | B |
---|---|
1 | One |
2 | Two |
3 | Three |
We can bind the table component's props.data property to this tag with a Tag Binding. From here we can add a script transform with the following:
# This list will be used to create a JSON like structure that will insert rows for our styles output_json = [] # Here we can define what styling on our rows will be. style_orange = {"backgroundColor": "#F7901D"} style_green = {"backgroundColor": "#00AA00"} # You could change more than just the background color, for example: # style_another_example {"backgroundColor": "#00AA00", "font-weight": "bold"} for row in range(value.getRowCount()): row_object = {} row_value = {} row_style = {} for col in range(value.getColumnCount()): row_value[value.getColumnName(col)] = value.getValueAt(row, col) row_object['value'] = row_value # Here we're checking the name of the column that we want to base our styling on. if value.getColumnName(col) == 'B': # Here we're checking for individual values within the column, and applying styling if value.getValueAt(row, col) == 'One': row_style = style_orange elif value.getValueAt(row, col) == 'Two': row_style = style_green row_object['style'] = row_style output_json.append(row_object) return output_json
This would result in coloring rows where the "B" column has distinct values of "One" or "Two".
For more examples of the Table component, please see the following pages:
豪气的地瓜 · 8. 函数 — KingbaseES产品手册 4 天前 |
纯真的包子 · Could not commit JPA transaction when I use save to insert data to oracledatabase · Issue #2138 · ap 4 天前 |
含蓄的薯片 · 如何在PS里使用stable diffusion插件?_ps sd插件 12 小时前 |
无邪的仙人球 · 英国新无人机方案引关注--军事--人民网 7 月前 |
可爱的石榴 · 娱乐大佬漫画 - 抖音 1 年前 |