@@ -3,6 +3,7 @@ import Field from './Field';
33import PropTypes from 'prop-types' ;
44import React , { Component } from 'react' ;
55import { connectToContainer } from 'lib' ;
6+ import { EDITOR_ACTIONS } from 'lib/constants' ;
67
78export class UnconnectedColorscalePicker extends Component {
89 constructor ( props ) {
@@ -22,6 +23,13 @@ export class UnconnectedColorscalePicker extends Component {
2223 } ) ,
2324 colorscaleType
2425 ) ;
26+ this . context . onUpdate ( {
27+ type : EDITOR_ACTIONS . UPDATE_TRACES ,
28+ payload : {
29+ update : { autocolorscale : false } ,
30+ traceIndexes : [ this . props . fullContainer . index ] ,
31+ } ,
32+ } ) ;
2533 }
2634 }
2735
@@ -43,6 +51,7 @@ export class UnconnectedColorscalePicker extends Component {
4351
4452UnconnectedColorscalePicker . propTypes = {
4553 fullValue : PropTypes . any ,
54+ fullContainer : PropTypes . object ,
4655 updatePlot : PropTypes . func ,
4756 initialCategory : PropTypes . string ,
4857 ...Field . propTypes ,
@@ -51,6 +60,7 @@ UnconnectedColorscalePicker.propTypes = {
5160UnconnectedColorscalePicker . contextTypes = {
5261 container : PropTypes . object ,
5362 graphDiv : PropTypes . object ,
63+ onUpdate : PropTypes . func ,
5464} ;
5565
5666export default connectToContainer ( UnconnectedColorscalePicker ) ;
0 commit comments