|
1 | 1 | // @flow
|
2 |
| -import React, { useState } from 'react'; |
3 |
| -import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd'; |
4 |
| -import Select from 'react-select'; |
| 2 | +import { |
| 3 | + faArrowDown, |
| 4 | + faArrowUp, |
| 5 | + faPencilAlt, |
| 6 | + faTrash, |
| 7 | +} from '@fortawesome/free-solid-svg-icons'; |
| 8 | +import type { Node } from 'react'; |
| 9 | +import React from 'react'; |
| 10 | +import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd'; |
5 | 11 | import { createUseStyles } from 'react-jss';
|
| 12 | +import Select from 'react-select'; |
6 | 13 | import {
|
7 | 14 | Alert,
|
| 15 | + FormFeedback, |
| 16 | + FormGroup, |
8 | 17 | Input,
|
9 | 18 | UncontrolledTooltip,
|
10 |
| - FormGroup, |
11 |
| - FormFeedback, |
12 | 19 | } from 'reactstrap';
|
13 |
| -import { |
14 |
| - faArrowUp, |
15 |
| - faArrowDown, |
16 |
| - faPencilAlt, |
17 |
| - faTrash, |
18 |
| -} from '@fortawesome/free-solid-svg-icons'; |
| 20 | +import Add from './Add'; |
| 21 | +import Card from './Card'; |
| 22 | +import CardModal from './CardModal'; |
19 | 23 | import FBCheckbox from './checkbox/FBCheckbox';
|
20 | 24 | import Collapse from './Collapse/Collapse';
|
21 |
| -import CardModal from './CardModal'; |
22 | 25 | import { CardDefaultParameterInputs } from './defaults/defaultInputs';
|
| 26 | +import FontAwesomeIcon from './FontAwesomeIcon'; |
23 | 27 | import Tooltip from './Tooltip';
|
24 |
| -import Add from './Add'; |
25 |
| -import Card from './Card'; |
26 | 28 | import {
|
27 |
| - checkForUnsupportedFeatures, |
28 |
| - generateElementComponentsFromSchemas, |
29 |
| - countElementsFromSchema, |
30 | 29 | addCardObj,
|
31 | 30 | addSectionObj,
|
| 31 | + checkForUnsupportedFeatures, |
| 32 | + countElementsFromSchema, |
| 33 | + generateElementComponentsFromSchemas, |
| 34 | + getRandomId, |
32 | 35 | onDragEnd,
|
33 | 36 | } from './utils';
|
34 |
| -import FontAwesomeIcon from './FontAwesomeIcon'; |
35 |
| -import { getRandomId } from './utils'; |
36 |
| -import type { Node } from 'react'; |
37 |
| -import type { FormInput, Mods } from './types'; |
38 | 37 |
|
39 | 38 | const useStyles = createUseStyles({
|
40 | 39 | sectionContainer: {
|
@@ -506,11 +505,17 @@ export default function Section({
|
506 | 505 | name: keyName,
|
507 | 506 | schema,
|
508 | 507 | type: 'object',
|
| 508 | + 'ui:column': uischema['ui:column'] ?? '', |
509 | 509 | }}
|
510 | 510 | isOpen={modalOpen}
|
511 | 511 | onClose={() => setModalOpen(false)}
|
512 | 512 | onChange={(newComponentProps: { [string]: any }) => {
|
513 | 513 | onDependentsChange(newComponentProps.dependents);
|
| 514 | + |
| 515 | + onChange(schema, { |
| 516 | + ...uischema, |
| 517 | + 'ui:column': newComponentProps['ui:column'], |
| 518 | + }); |
514 | 519 | }}
|
515 | 520 | TypeSpecificParameters={CardDefaultParameterInputs}
|
516 | 521 | />
|
|
0 commit comments