Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion stories/HasManyFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import {
HasManyFields,
HasManyFieldsAdd,
HasManyFieldsRow,
Input
Input,
Select
} from '../src';
import COUNTRIES from '../src/components/address/Countries';

const items = [
{
Expand Down Expand Up @@ -37,7 +39,23 @@ const items = [
},
];

const UncontrolledSelect = () => <Select options={COUNTRIES} />;

storiesOf('HasManyFields', module)
.add('Uncontrolled inputs', () => (
<HasManyFields
template={UncontrolledSelect}
label="Add a state"
disabled={boolean('disabled', false)}
onAdd={action('hasManyFields onAdd')}
onRemove={action('hasManyFields onRemove')}
onUpdate={action('hasManyFields onUpdate')}
onChange={action('hasManyFields onChange')}
minimumRows={number('minimumRows', 1)}
maximumRows={number('maximumRows', 5)}
reorderable={boolean('reorderable', false)}
/>
))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something you want to merge, or just bug demo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bug demo that I'll attach to an issue. I would also add this commit to a fix on a future FFF.

.add('Live Example', () => (
<HasManyFields
defaultValue={items}
Expand Down