31 |
32 | {title &&
{title}
}
33 | {props.field.uniforms.help &&
{props.field.uniforms.help}
}
34 |
35 | {!!(error && showInlineError) &&
{errorMessage}}
36 |
37 | {children
38 | ? injectName(name, children)
39 | : fields.map(key =>
)}
40 |
41 | );
42 | };
43 |
44 | export default gsfConnectField(GsfNest, { ensureValue: false, includeInChain: false });
45 |
--------------------------------------------------------------------------------
/packages/admin/src/ts/components/uniforms/fields/GsfSelectField.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { wrapField } from 'uniforms-bootstrap4';
4 | import gsfConnectField from './gsfConnectField';
5 |
6 | const xor = (item, array) => {
7 | const index = array.indexOf(item);
8 | if (index === -1) {
9 | return array.concat([ item ]);
10 | }
11 |
12 | return array.slice(0, index).concat(array.slice(index + 1));
13 | };
14 |
15 | const renderCheckboxes = props => props.allowedValues.map(item => (
16 |