mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add type annotation to the DataTable
Now that the new DataTable is merged in.
This commit is contained in:
@@ -27,7 +27,7 @@ class WidgetDisableTestApp(App[None]):
|
||||
|
||||
@property
|
||||
def data_table(self) -> DataTable:
|
||||
data_table = DataTable()
|
||||
data_table = DataTable[str]()
|
||||
data_table.add_columns("Column 1", "Column 2", "Column 3", "Column 4")
|
||||
data_table.add_rows(
|
||||
[(str(n), str(n * 10), str(n * 100), str(n * 1000)) for n in range(100)]
|
||||
|
||||
Reference in New Issue
Block a user