Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit e4f37cc

Browse files
committed
Reverting last change, using <Control.custom> instead. Fixes #743
1 parent 1c1c1bc commit e4f37cc

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/components/control-component.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,14 +656,16 @@ function createControlClass(s = defaultStrategy) {
656656
/* eslint-disable react/prop-types */
657657
const DefaultConnectedControl = (props) => (
658658
<ConnectedControl
659-
mapProps={props.component
660-
? props.mapProps
661-
: controlPropsMap.default
662-
}
659+
mapProps={{
660+
...controlPropsMap.default,
661+
...props.mapProps,
662+
}}
663663
{...omit(props, 'mapProps')}
664664
/>
665665
);
666666

667+
DefaultConnectedControl.custom = ConnectedControl;
668+
667669
DefaultConnectedControl.input = (props) => (
668670
<ConnectedControl
669671
component="input"

test/custom-control-component-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ describe('custom <Control /> components', () => {
364364

365365
TestUtils.renderIntoDocument(
366366
<Provider store={store}>
367-
<Control
367+
<Control.custom
368368
model="test.foo"
369369
component={CustomControl}
370370
/>

0 commit comments

Comments
 (0)