[hotfix] fixing issues around new time_table viz (#3599)

This commit is contained in:
Maxime Beauchemin
2017-10-04 16:22:11 -07:00
committed by GitHub
parent ed212440b5
commit 1fb8716231
5 changed files with 11 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ const propTypes = {
]),
isFloat: PropTypes.bool,
isInt: PropTypes.bool,
control: PropTypes.func,
controlName: PropTypes.string.isRequired,
};
const defaultProps = {
@@ -64,7 +64,7 @@ export default class CollectionControl extends React.Component {
if (this.props.value.length === 0) {
return <div className="text-muted">{this.props.placeholder}</div>;
}
const control = controlMap[this.props.control];
const Control = controlMap[this.props.controlName];
return (
<SortableListGroup
useDragHandle
@@ -81,7 +81,7 @@ export default class CollectionControl extends React.Component {
<SortableDragger />
</div>
<div className="pull-left">
<control
<Control
{...o}
onChange={this.onChange.bind(this, i)}
/>