in src/components/side-panel/layer-panel/vis-config-by-field-selector.js [55:112]
render() {
const {
property,
showScale,
selectedField,
description,
label,
intl,
scaleOptions = []
} = this.props;
return (
<SidePanelSection>
<SidePanelSection>
<PanelLabelWrapper>
<PanelLabel>
{(label && <FormattedMessage id={label} />) || (
<FormattedMessage
id="layer.propertyBasedOn"
values={{
property: intl.formatMessage({
id: `property.${camelize(property)}`,
defaultMessage: property
})
}}
/>
)}
</PanelLabel>
{description && (
<InfoHelper
description={description}
property={property}
id={`${this.props.id}-${property}`}
/>
)}
</PanelLabelWrapper>
<FieldSelector
fields={this.props.fields}
value={selectedField && selectedField.name}
placeholder={this.props.placeholder}
onSelect={this._updateVisByField}
erasable
/>
</SidePanelSection>
<div>
{showScale ? (
<DimensionScaleSelector
scaleType={this.props.scaleType}
options={scaleOptions}
label={`${property} scale`}
onSelect={this.props.updateScale}
disabled={scaleOptions.length < 2}
/>
) : null}
</div>
</SidePanelSection>
);
}