import React from 'react'; import forceArray from 'force-array'; import { FormGroup, Input, FormLabel, ViewContainer, StatusLoader } from 'joyent-ui-toolkit'; import Item from './item'; export default ({ instances, loading, handleChange = () => null, handleSubmit }) => { const _instances = forceArray(instances); const items = _instances.map((instance, i, all) => ( )); const _loading = (!items.length && loading) ? ( ) : null; return (
handleSubmit(ctx => handleChange(ctx))}> Filter instances {_loading} {items}
); };