Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit cf963e7

Browse files
committed
fix(FormInputGroup): make breaking change non-breaking
1 parent e934849 commit cf963e7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

example/src/FormElementsPage.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ function FormElements() {
158158
<Form.Group label="Input Group Buttons">
159159
<Form.InputGroup>
160160
<Form.Input />
161-
<Form.InputGroupAppend>
161+
<Form.InputGroup append>
162162
<Button color="primary">Actions</Button>
163163
<Button.Dropdown color="primary">
164164
<Dropdown.Item>News</Dropdown.Item>
165165
<Dropdown.Item>Messages</Dropdown.Item>
166166
<Dropdown.ItemDivider />
167167
<Dropdown.Item>Edit Profile</Dropdown.Item>
168168
</Button.Dropdown>
169-
</Form.InputGroupAppend>
169+
</Form.InputGroup>
170170
</Form.InputGroup>
171171
</Form.Group>
172172
</ComponentDemo>

src/components/Form/FormInputGroup.react.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ function FormInputGroup(props: Props): React.Node {
2727
const Component = RootComponent || "div";
2828
const children = inputProps ? <Form.Input {...inputProps} /> : props.children;
2929

30+
if (prepend === true) {
31+
return <FormInputGroupPrepend>{children}</FormInputGroupPrepend>;
32+
}
33+
34+
if (append === true) {
35+
return <FormInputGroupAppend>{children}</FormInputGroupAppend>;
36+
}
37+
3038
return (
3139
<Component className={classes}>
3240
{prepend && <FormInputGroupPrepend>{prepend}</FormInputGroupPrepend>}

0 commit comments

Comments
 (0)