-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into widget-hydration-py
- Loading branch information
Showing
19 changed files
with
938 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,6 @@ | |
"@deephaven/plugin": "^0.58.0", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.0.8" | ||
} | ||
}, | ||
"private": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,46 @@ | ||
from __future__ import annotations | ||
|
||
from deephaven.table import Table | ||
from ..elements import UITable | ||
from ..types import ( | ||
CellPressCallback, | ||
ColumnPressCallback, | ||
RowPressCallback, | ||
) | ||
|
||
|
||
def table(table: Table) -> UITable: | ||
def table( | ||
table: Table, | ||
*, | ||
on_row_press: RowPressCallback | None = None, | ||
on_row_double_press: RowPressCallback | None = None, | ||
on_cell_press: CellPressCallback | None = None, | ||
on_cell_double_press: CellPressCallback | None = None, | ||
on_column_press: ColumnPressCallback | None = None, | ||
on_column_double_press: ColumnPressCallback | None = None, | ||
) -> UITable: | ||
""" | ||
Add some extra methods to the Table class for giving hints to displaying a table | ||
Customization to how a table is displayed, how it behaves, and listen to UI events. | ||
Args: | ||
table: The table to wrap | ||
on_row_press: The callback function to run when a row is clicked. | ||
The first parameter is the row index, and the second is the row data provided in a dictionary where the | ||
column names are the keys. | ||
on_row_double_press: The callback function to run when a row is double clicked. | ||
The first parameter is the row index, and the second is the row data provided in a dictionary where the | ||
column names are the keys. | ||
on_cell_press: The callback function to run when a cell is clicked. | ||
The first parameter is the cell index, and the second is the row data provided in a dictionary where the | ||
column names are the keys. | ||
on_cell_double_press: The callback function to run when a cell is double clicked. | ||
The first parameter is the cell index, and the second is the row data provided in a dictionary where the | ||
column names are the keys. | ||
on_column_press: The callback function to run when a column is clicked. | ||
The first parameter is the column name. | ||
on_column_double_press: The callback function to run when a column is double clicked. | ||
The first parameter is the column name. | ||
""" | ||
return UITable(table) | ||
props = locals() | ||
del props["table"] | ||
return UITable(table, **props) |
Oops, something went wrong.