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:
@@ -16,12 +16,12 @@ const defaultProps = {
|
||||
};
|
||||
|
||||
export default class ControlPanelSection extends React.Component {
|
||||
header() {
|
||||
renderHeader() {
|
||||
const { label, tooltip } = this.props;
|
||||
let header;
|
||||
if (label) {
|
||||
header = (
|
||||
<div className="panel-title">
|
||||
<div>
|
||||
{label}
|
||||
{tooltip && <InfoTooltipWithTrigger label={label} tooltip={tooltip} />}
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@ export default class ControlPanelSection extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Panel header={this.header()}>
|
||||
<Panel header={this.renderHeader()}>
|
||||
{this.props.children}
|
||||
</Panel>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user