diff --git a/src/collections/Form/FormField.js b/src/collections/Form/FormField.js index c81cb4b516..7cfcf99b02 100644 --- a/src/collections/Form/FormField.js +++ b/src/collections/Form/FormField.js @@ -71,7 +71,7 @@ function FormField(props) { } // pass label prop to controls that support it - if (control === Checkbox || control === Radio || _.has(control, 'propTypes.label')) { + if (control === Checkbox || control === Radio) { return ( {createElement(control, { ...controlProps, label })} diff --git a/test/specs/collections/Form/FormField-test.js b/test/specs/collections/Form/FormField-test.js index 400e6a1e86..47321cc037 100644 --- a/test/specs/collections/Form/FormField-test.js +++ b/test/specs/collections/Form/FormField-test.js @@ -65,20 +65,5 @@ describe('FormField', () => { .find('Radio') .should.have.prop('label', 'Passed to the Radio') }) - it('is passed to custom control components with a "label" propType', () => { - const HandlesLabel = () => null - HandlesLabel.propTypes = { label: () => null } - - shallow() - .find('HandlesLabel') - .should.have.prop('label', 'Passed to the HandlesLabel') - }) - it('is not passed to custom control components without a "label" propType', () => { - const DoesNotHandleLabel = () => null - - shallow() - .find('DoesNotHandleLabel') - .should.not.have.prop('label', 'Passed to the DoesNotHandleLabel') - }) }) })