Skip to content

Commit ff6f726

Browse files
authored
Merge pull request formio#545 from formio/bugfix/nested-tree
Fix issue where non tree components were getting set to tree.
2 parents a018a97 + 470d5ca commit ff6f726

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

src/components/container/Container.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default class ContainerComponent extends NestedComponent {
88
key: 'container',
99
clearOnHide: true,
1010
input: true,
11+
tree: true,
1112
components: []
1213
}, ...extend);
1314
}

src/components/datagrid/DataGrid.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default class DataGridComponent extends NestedComponent {
99
type: 'datagrid',
1010
clearOnHide: true,
1111
input: true,
12+
tree: true,
1213
components: []
1314
}, ...extend);
1415
}

src/components/editgrid/EditGrid.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default class EditGridComponent extends NestedComponent {
1111
key: 'editGrid',
1212
clearOnHide: true,
1313
input: true,
14+
tree: true,
1415
components: [],
1516
templates: {
1617
header: this.defaultHeaderTemplate,

src/components/nested/NestedComponent.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import Components from '../Components';
66

77
export default class NestedComponent extends BaseComponent {
88
static schema(...extend) {
9-
return BaseComponent.schema({
10-
tree: true
11-
}, ...extend);
9+
return BaseComponent.schema({}, ...extend);
1210
}
1311

1412
constructor(component, options, data) {

src/utils/utils.js

+1
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ export function eachComponent(components, fn, includeAll, path, parent) {
209209
const subPath = () => {
210210
if (
211211
component.key &&
212+
!['panel', 'table', 'well', 'columns', 'fieldset', 'tabs', 'form'].includes(component.type) &&
212213
(
213214
['datagrid', 'container', 'editgrid'].includes(component.type) ||
214215
component.tree

0 commit comments

Comments
 (0)