You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 24, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/flet_datatable2/datacolumn2.py
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
fromdataclassesimportdataclass
2
-
fromenumimportEnum
3
1
fromtypingimportOptional
4
2
5
3
importfletasft
4
+
from .typesimportDataColumnSize
6
5
7
6
__all__= ["DataColumn2"]
8
7
9
8
10
9
@ft.control("DataColumn2")
11
10
classDataColumn2(ft.Control):
12
11
"""
13
-
Column configuration for a [DataTable2](datatable2.md).
12
+
Column configuration for a [`DataTable2`](datatable2.md).
14
13
15
14
One column configuration must be provided for each column to display in the table.
16
15
17
-
Additional to Flet [DataColumn](https://flet.dev/docs/controls/datatable/#datacolumn), adds the capability to set relative column size via size property.
The contents of cells of columns containing numeric data are right-aligned.
43
43
"""
44
44
45
-
size: Optional[Size] =None
45
+
size: Optional[DataColumnSize] =DataColumnSize.S
46
46
"""
47
-
Column sizes are determined based on available width by distributing it to individual columns accounting for their relative sizes. Value is of type `Size` and defaults to `Size.S`.
47
+
Column sizes are determined based on available width by distributing
48
+
it to individual columns accounting for their relative sizes.
0 commit comments