Skip to content

Commit 520d678

Browse files
committed
Fix multivalued messages
1 parent a6b2f5a commit 520d678

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

src/components/fields/MarkerColor.js

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,22 @@ class UnconnectedMarkerColor extends Component {
167167
renderVariableControls() {
168168
const _ = this.context.localize;
169169
return (
170-
<Fragment>
170+
<Field multiValued={this.isMultiValued()}>
171171
<DataSelector
172+
suppressMultiValuedMessage
172173
attr="marker.color"
173174
placeholder={_('Select a Data Option')}
174175
/>
175176
{this.props.container.marker &&
176177
this.props.container.marker.colorscale === MULTI_VALUED ? null : (
177178
<Colorscale
179+
suppressMultiValuedMessage
178180
attr="marker.colorscale"
179181
updatePlot={this.setColorScale}
180182
colorscale={this.state.colorscale}
181183
/>
182184
)}
183-
</Fragment>
185+
</Field>
184186
);
185187
}
186188

@@ -195,20 +197,22 @@ class UnconnectedMarkerColor extends Component {
195197

196198
return (
197199
<Fragment>
198-
<Field {...this.props} multiValued={this.isMultiValued()} attr={attr}>
199-
<RadioBlocks
200-
options={options}
201-
activeOption={type}
202-
onOptionChange={this.setType}
203-
/>
200+
<Field {...this.props} attr={attr}>
201+
<Field multiValued={this.isMultiValued() && !this.state.type}>
202+
<RadioBlocks
203+
options={options}
204+
activeOption={type}
205+
onOptionChange={this.setType}
206+
/>
204207

205-
{!type ? null : (
206-
<Info>
207-
{type === 'constant'
208-
? _('All points in a trace are colored in the same color.')
209-
: _('Each point in a trace is colored according to data.')}
210-
</Info>
211-
)}
208+
{!type ? null : (
209+
<Info>
210+
{type === 'constant'
211+
? _('All points in a trace are colored in the same color.')
212+
: _('Each point in a trace is colored according to data.')}
213+
</Info>
214+
)}
215+
</Field>
212216

213217
{!type
214218
? null

0 commit comments

Comments
 (0)