ReorderTable
Introduction
ReorderTable widget in Supervisely displays tabular data and lets users reorder rows directly in the UI.
Key features:
Drag-and-drop row reordering
Search rows by text
Multi-row selection
Floating action panel for moving selected rows (
Top,Up,Set to #,Down,Bottom)Pagination (
page_size)

Function signature

Parameters
columns
List[str]
Table column header names.
data
Optional[List[List]]
Table rows; each row is a list of cell values ordered by columns.
page_size
int
Number of rows per page.
content_top_right
Optional[Widget]
Optional widget rendered in the top-right area of the table header.
widget_id
Optional[str]
ID of the widget.
columns
Column header names.
type: List[str]
data
Initial table rows. Each row is a list of cell values ordered by columns.
type: Optional[List[List]]
default value: None (treated as an empty list)
Notes:
Every row must have exactly
len(columns)cells; otherwise aValueErroris raised.Cell values should be JSON-serializable (strings, numbers, booleans, etc.).
page_size
Number of rows per page.
type: int
default value: 10
Notes:
The value is converted to
intand clamped to a minimum of1.
content_top_right
Optional widget rendered in the top-right area of the table header. Common use-cases: refresh button, help button, status indicator.
type: Optional[Widget]
default value: None
widget_id
ID of the widget.
type: Optional[str]
default value: None
Methods and attributes
get_order()
List[int]
Get current row order (0-based indices of rows in the original data).
get_reordered_data()
List
Get all table rows arranged in the current user-defined order.
get_column_data(column_name: str)
List
Get values from one column in the current row order.
set_data(columns: List[str], data: List[List])
None
Replace table data and reset order, page, and selection.
reset_order()
None
Reset current order to the original identity order (also clears selection).
is_order_changed()
bool
Check whether current order differs from the original order.
@order_changed
decorator
Register a callback fired whenever row order changes in the UI.

Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/tables/008_reorder_table/src/main.py
Import libraries
Initialize widget
Create app layout
Add functions to control widgets from code
Last updated
Was this helpful?