|
1 | | -// (C) Copyright 2024-2025 Dassault Systemes SE. All Rights Reserved. |
| 1 | +// (C) Copyright 2024-2026 Dassault Systemes SE. All Rights Reserved. |
2 | 2 |
|
3 | 3 | import { useNavigate } from 'react-router-dom'; |
4 | 4 | import { withTranslation } from "react-i18next"; |
5 | 5 | import { TableBody, TableTh, TableCell, Table as TableCustom, TableHead, TableRow } from '../../controls/Table'; |
6 | | -import { getResourceByPath, getCreatePath, getChild, replaceVariables, getSchemaPath, hasMonitoredPath } from "../../../utils/schema"; |
| 6 | +import { getResourceByPath, getChild, getSchemaPath, hasMonitoredPath, getEntryPath } from "../../../utils/schema"; |
7 | 7 | import { Rest } from "./Rest"; |
8 | 8 | import Dialog from "./Dialog"; |
9 | 9 | import { MenuItemProps, PageProps, TempAny } from "../../../utils/types"; |
@@ -174,7 +174,7 @@ function Table(props: TableProps) { |
174 | 174 | If the field is hierarchical, it will find the schema of the right most field. |
175 | 175 | Returns defaults if not found. */ |
176 | 176 | function getFieldSchema(fieldName: string) { |
177 | | - const fieldsSchema = getChild(getResourceByPath(schema, getCreatePath(schema, path) || path), ["get", "responses", "200", "content", "application/json", "schema", "properties"]); |
| 177 | + const fieldsSchema = getChild(getResourceByPath(schema, getEntryPath(schema, path) || path), ["get", "responses", "200", "content", "application/json", "schema", "properties"]); |
178 | 178 | let fs = fieldsSchema; |
179 | 179 | let fn = fieldName; |
180 | 180 | while (fs && fn.includes(".") && fn.split(".")[0] in fs) { |
|
0 commit comments