Skip to content

Commit 6724ab0

Browse files
fix: do not share the Expr for text_color and background_color
Signed-off-by: Maarten A. Breddels <[email protected]>
1 parent 061975d commit 6724ab0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ipydatagrid/cellrenderer.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ class TextRenderer(CellRenderer):
6868
).tag(sync=True, **widget_serialization)
6969
text_color = Union(
7070
(Color(), Instance(VegaExpr), Instance(ColorScale)),
71-
default_value=Expr("default_value"),
7271
).tag(sync=True, **widget_serialization)
7372
background_color = Union(
7473
(Color(), Instance(VegaExpr), Instance(ColorScale)),
75-
default_value=Expr("default_value"),
7674
).tag(sync=True, **widget_serialization)
7775
vertical_alignment = Union(
7876
(
@@ -98,6 +96,14 @@ class TextRenderer(CellRenderer):
9896
)
9997
missing = Unicode("").tag(sync=True)
10098

99+
@default('text_color')
100+
def _default_text_color(self):
101+
return Expr("default_value")
102+
103+
@default('background_color')
104+
def _default_background_color(self):
105+
return Expr("default_value")
106+
101107

102108
class BarRenderer(TextRenderer):
103109
_model_name = Unicode("BarRendererModel").tag(sync=True)

0 commit comments

Comments
 (0)