diff --git a/src/PlotlyEditor.js b/src/PlotlyEditor.js index 6fcf994c7..7e553be97 100644 --- a/src/PlotlyEditor.js +++ b/src/PlotlyEditor.js @@ -38,6 +38,8 @@ class PlotlyEditor extends Component { data: gd.data, dataSources: this.props.dataSources, dataSourceOptions: this.props.dataSourceOptions, + dataSourceValueRenderer: this.props.dataSourceValueRenderer, + dataSourceOptionRenderer: this.props.dataSourceOptionRenderer, dictionaries: dictionaries, fullData: gd._fullData, fullLayout: gd._fullLayout, @@ -150,6 +152,8 @@ PlotlyEditor.propTypes = { className: PropTypes.string, dataSources: PropTypes.object, dataSourceOptions: PropTypes.array, + dataSourceValueRenderer: PropTypes.func, + dataSourceOptionRenderer: PropTypes.func, graphDiv: PropTypes.object, locale: PropTypes.string, revision: PropTypes.any, @@ -170,6 +174,8 @@ PlotlyEditor.childContextTypes = { data: PropTypes.array, dataSources: PropTypes.object, dataSourceOptions: PropTypes.array, + dataSourceValueRenderer: PropTypes.func, + dataSourceOptionRenderer: PropTypes.func, dictionaries: PropTypes.object, fullData: PropTypes.array, fullLayout: PropTypes.object, diff --git a/src/components/fields/DataSelector.js b/src/components/fields/DataSelector.js index f0c8c8512..15efa40b2 100644 --- a/src/components/fields/DataSelector.js +++ b/src/components/fields/DataSelector.js @@ -61,6 +61,8 @@ class DataSelector extends Component { options={this.dataSourceOptions} value={this.fullValue} onChange={this.updatePlot} + optionRenderer={this.context.dataSourceOptionRenderer} + valueRenderer={this.context.dataSourceValueRenderer} clearable={this.props.clearable} /> @@ -78,6 +80,8 @@ DataSelector.propTypes = { DataSelector.contextTypes = { dataSources: PropTypes.object, dataSourceOptions: PropTypes.array, + dataSourceValueRenderer: PropTypes.func, + dataSourceOptionRenderer: PropTypes.func, }; function modifyPlotProps(props, context, plotProps) {