Clean version before implementing formatting
This commit is contained in:
@@ -62,6 +62,7 @@ class DatagridState(DbObject):
|
||||
self.filtered: dict = {}
|
||||
self.edition: DatagridEditionState = DatagridEditionState()
|
||||
self.selection: DatagridSelectionState = DatagridSelectionState()
|
||||
self.cell_formats: dict = {}
|
||||
self.ne_df = None
|
||||
|
||||
self.ns_fast_access = None
|
||||
@@ -489,9 +490,6 @@ class DataGrid(MultipleInstance):
|
||||
OPTIMIZED: Accepts pre-computed filter_keyword_lower to avoid repeated dict lookups.
|
||||
OPTIMIZED: Uses OptimizedDiv instead of Div for faster rendering.
|
||||
"""
|
||||
if not col_def.usable:
|
||||
return None
|
||||
|
||||
if not col_def.visible:
|
||||
return None
|
||||
|
||||
@@ -652,9 +650,6 @@ class DataGrid(MultipleInstance):
|
||||
appropriate default content or styling is applied.
|
||||
:rtype: Div | None
|
||||
"""
|
||||
if not col_def.usable:
|
||||
return None
|
||||
|
||||
if not col_def.visible:
|
||||
return Div(cls="dt2-col-hidden")
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ class DataGridRowState:
|
||||
row_id: int
|
||||
visible: bool = True
|
||||
height: int | None = None
|
||||
format: list = field(default_factory=list)
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -17,8 +18,8 @@ class DataGridColumnState:
|
||||
title: str = None
|
||||
type: ColumnType = ColumnType.Text
|
||||
visible: bool = True
|
||||
usable: bool = True
|
||||
width: int = DATAGRID_DEFAULT_COLUMN_WIDTH
|
||||
format: list = field(default_factory=list) #
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -159,5 +159,5 @@ icons = {
|
||||
ColumnType.Number: number_row20_regular,
|
||||
ColumnType.Datetime: calendar_ltr20_regular,
|
||||
ColumnType.Bool: checkbox_checked20_filled,
|
||||
ColumnType.List: text_bullet_list_square20_regular,
|
||||
ColumnType.Enum: text_bullet_list_square20_regular,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user