{
return computeChildLabel(
diff --git a/packages/material-renderers/src/layouts/MaterialArrayLayout.tsx b/packages/material-renderers/src/layouts/MaterialArrayLayout.tsx
index 6846fd421..32fa6daf5 100644
--- a/packages/material-renderers/src/layouts/MaterialArrayLayout.tsx
+++ b/packages/material-renderers/src/layouts/MaterialArrayLayout.tsx
@@ -51,7 +51,7 @@ const MaterialArrayLayoutComponent = (
[]
);
const isExpanded = (index: number) =>
- expanded === composePaths(props.path, `${index}`);
+ expanded === composePaths(props.path, index);
const {
enabled,
diff --git a/packages/vanilla-renderers/src/complex/TableArrayControl.tsx b/packages/vanilla-renderers/src/complex/TableArrayControl.tsx
index 7fe25ec28..62c48bf89 100644
--- a/packages/vanilla-renderers/src/complex/TableArrayControl.tsx
+++ b/packages/vanilla-renderers/src/complex/TableArrayControl.tsx
@@ -40,7 +40,6 @@ import {
Resolve,
Test,
getControlPath,
- encode,
ArrayTranslations,
} from '@jsonforms/core';
import {
@@ -105,7 +104,8 @@ class TableArrayControl extends React.Component<
const createControlElement = (key?: string): ControlElement => ({
type: 'Control',
label: false,
- scope: schema.type === 'object' ? `#/properties/${key}` : '#',
+ scope:
+ schema.type === 'object' ? Paths.compose('#', 'properties', key) : '#',
});
const isValid = errors.length === 0;
const divClassNames = [validationClass]
@@ -155,8 +155,7 @@ class TableArrayControl extends React.Component<
) : (
data.map((_child, index) => {
- const childPath = Paths.compose(path, `/${index}`);
- // TODO
+ const childPath = Paths.compose(path, index);
const errorsPerEntry: any[] = filter(childErrors, (error) => {
const errorPath = getControlPath(error);
return errorPath.startsWith(childPath);
@@ -182,29 +181,24 @@ class TableArrayControl extends React.Component<
(prop) => schema.properties[prop].type !== 'array'
),
fpmap((prop) => {
- const childPropPath = Paths.compose(
- childPath,
- '/' + prop.toString()
- );
+ const childPropPath = Paths.compose(childPath, prop);
return (
|
);
})
)(schema.properties)
) : (
-
+ |
{data ? (
range(0, data.length).map((index) => {
- const childPath = composePaths(path, `${index}`);
+ const childPath = composePaths(path, index);
return (
|