Skip to content

Commit 4708a57

Browse files
fix(graphOptions/colorMapping): send updated colors to colorMapping right away without waiting for next render (#5231)
1 parent 5988e7c commit 4708a57

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/visualization/types/Graph/options.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,12 @@ const GraphViewOptions: FC<Props> = ({properties, results, update}) => {
233233
results.table,
234234
groupKey
235235
)
236+
// the properties that we use to calculate the colors are updated in the next render cycle so we need
237+
// to make a new object and override the colors
238+
const newProperties = {...properties, colors}
236239
const colorMapping = generateSeriesToColorHex(
237240
fillColumnMap,
238-
properties
241+
newProperties
239242
)
240243

241244
update({colors, colorMapping})

0 commit comments

Comments
 (0)