diff --git a/src/lib/models/path.ts b/src/lib/models/path.ts index aac91c73..e380fad4 100644 --- a/src/lib/models/path.ts +++ b/src/lib/models/path.ts @@ -59,7 +59,7 @@ export const getFieldFilterFromPath = ( return recur(resolvePath(path), 0) } -export const getSchemaPropertyFromPath = ( +export const getSchemaPropertyForPath = ( schema: Schema, path: string ): SchemaFieldProperty | undefined => { @@ -76,7 +76,7 @@ export const getSchemaPropertyFromPath = ( } export const getFieldFilter = (schema: Schema, path: string) => { - const schemaProperty = getSchemaPropertyFromPath(schema, path) + const schemaProperty = getSchemaPropertyForPath(schema, path) if (schemaProperty?.propertyType === SchemaFieldPropertyType.REFERENCE) { return `${schemaProperty.fieldName}[id, displayName]` diff --git a/src/pages/dataElements/List.spec.tsx b/src/pages/dataElements/List.spec.tsx index a07b4f26..56da08a2 100644 --- a/src/pages/dataElements/List.spec.tsx +++ b/src/pages/dataElements/List.spec.tsx @@ -8,7 +8,6 @@ import { import userEvent from '@testing-library/user-event' import React from 'react' import dataElementSchemaMock from '../../__mocks__/schema/dataElementsSchema.json' -// import { useModelListView } from '../../components/sectionList/listView' import { SECTIONS_MAP } from '../../lib' import { useSchemaStore } from '../../lib/schemas/schemaStore' import { ModelSchemas } from '../../lib/useLoadApp'