File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -696,6 +696,9 @@ class Column:
696
696
footer_style : CssRules | None = None
697
697
id : str | None = None
698
698
699
+ # props ----
700
+ default_sort_desc : bool = field (init = False )
701
+
699
702
# internal ----
700
703
# TODO: ideally this cannot be specified in the constructor
701
704
# it's just passed to the widget
@@ -714,6 +717,8 @@ def __post_init__(self):
714
717
aggregated = self .format .to_props (),
715
718
)
716
719
720
+ self .default_sort_desc = self .default_sort_order == "desc"
721
+
717
722
def _apply_transform (self , col_data : list [Any ], transform : callable ):
718
723
return [
719
724
to_hydrate_format (transform (CellInfo (val , ii , self .id )))
@@ -790,7 +795,9 @@ def merge(self, other: Column | None):
790
795
if other is None :
791
796
return self
792
797
793
- field_attrs = {field .name : getattr (self , field .name ) for field in fields (self )}
798
+ field_attrs = {
799
+ field .name : getattr (self , field .name ) for field in fields (self ) if field .init
800
+ }
794
801
return replace (other , ** filter_none (field_attrs ))
795
802
796
803
def to_props (self ) -> dict [str , Any ]:
You can’t perform that action at this time.
0 commit comments