diff --git a/caravel/assets/javascripts/explorev2/components/CheckboxField.jsx b/caravel/assets/javascripts/explorev2/components/CheckboxField.jsx index 0996b90396c5e..957b2f33241aa 100644 --- a/caravel/assets/javascripts/explorev2/components/CheckboxField.jsx +++ b/caravel/assets/javascripts/explorev2/components/CheckboxField.jsx @@ -21,7 +21,7 @@ export default class CheckboxField extends React.Component { } render() { return ( - + ); diff --git a/caravel/assets/javascripts/explorev2/components/FieldSetRow.jsx b/caravel/assets/javascripts/explorev2/components/FieldSetRow.jsx index 8ab8b877db445..22d7b56848e1c 100644 --- a/caravel/assets/javascripts/explorev2/components/FieldSetRow.jsx +++ b/caravel/assets/javascripts/explorev2/components/FieldSetRow.jsx @@ -2,6 +2,8 @@ import React, { PropTypes } from 'react'; import FieldSet from './FieldSet'; import { fields } from '../stores/store'; +const NUM_COLUMNS = 12; + const propTypes = { fieldSets: PropTypes.array.isRequired, fieldOverrides: PropTypes.object, @@ -23,16 +25,18 @@ function getFieldData(fs, fieldOverrides) { } export default function FieldSetRow({ fieldSets, fieldOverrides, onChange }) { + const colSize = NUM_COLUMNS / fieldSets.length; return ( - + ); } diff --git a/caravel/assets/spec/javascripts/explorev2/components/FieldSetRow_spec.js b/caravel/assets/spec/javascripts/explorev2/components/FieldSetRow_spec.js index 1d61ed0566e4e..dd66ac632d00a 100644 --- a/caravel/assets/spec/javascripts/explorev2/components/FieldSetRow_spec.js +++ b/caravel/assets/spec/javascripts/explorev2/components/FieldSetRow_spec.js @@ -2,10 +2,13 @@ import React from 'react'; import { expect } from 'chai'; import { describe, it, beforeEach } from 'mocha'; import { shallow } from 'enzyme'; +import { fields } from '../../../../javascripts/explorev2/stores/store'; import FieldSetRow from '../../../../javascripts/explorev2/components/FieldSetRow'; +import FieldSet from '../../../../javascripts/explorev2/components/FieldSet'; const defaultProps = { + fields, fieldSets: ['columns', 'metrics'], }; @@ -16,12 +19,12 @@ describe('FieldSetRow', () => { wrapper = shallow(); }); - it('renders a single