mirror of
https://github.com/apache/superset.git
synced 2026-06-06 08:09:14 +00:00
[explore-v2] control panel fixes (#1529)
* make fieldset conditions more clear * make label required * use render* pattern * use slugify util for turning labels into ids * use field rather than html * don't need panel-title class here
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import { FormGroup, FormControl } from 'react-bootstrap';
|
||||
import ControlLabelWithTooltip from './ControlLabelWithTooltip';
|
||||
import { slugify } from '../../modules/utils';
|
||||
|
||||
const propTypes = {
|
||||
label: PropTypes.string,
|
||||
@@ -14,7 +15,7 @@ const defaultProps = {
|
||||
|
||||
export default function SelectField({ label, description }) {
|
||||
return (
|
||||
<FormGroup controlId={`formControlsSelect-${label}`}>
|
||||
<FormGroup controlId={`formControlsSelect-${slugify(label)}`}>
|
||||
<ControlLabelWithTooltip label={label} description={description} />
|
||||
<FormControl componentClass="select" placeholder="select">
|
||||
<option value="select">select</option>
|
||||
|
||||
Reference in New Issue
Block a user