-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import { useFormLayouts } from '../../../../hooks'; | |
import { findLayoutsContainingDuplicateComponents } from '../../../../utils/formLayoutUtils'; | ||
import { useStudioEnvironmentParams } from 'app-shared/hooks/useStudioEnvironmentParams'; | ||
import { ComponentType } from 'app-shared/types/ComponentType'; | ||
import { useAppMetadataModelIdsQuery } from 'app-shared/hooks/queries/useAppMetadataModelIdsQuery'; | ||
import { useAppMetadataQuery } from 'app-development/hooks/queries'; | ||
|
||
export interface EditComponentIdRowProps { | ||
handleComponentUpdate: (component: FormItem) => void; | ||
|
@@ -29,7 +29,7 @@ export const EditComponentIdRow = ({ | |
useLayoutSchemaQuery(); | ||
|
||
const { org, app } = useStudioEnvironmentParams(); | ||
const { data: appMetadata } = useAppMetadataModelIdsQuery(org, app); | ||
const { data: appMetadata } = useAppMetadataQuery(org, app); | ||
const [isViewMode, setIsViewMode] = useState(true); | ||
const [errorMessage, setErrorMessage] = useState<string | undefined>(null); | ||
|
||
|
@@ -54,7 +54,7 @@ export const EditComponentIdRow = ({ | |
if (value !== component.id && idExists(value, formLayouts)) { | ||
return t('ux_editor.modal_properties_component_id_not_unique_error'); | ||
} | ||
const duplicateDatatypeId = appMetadata.find((modelId) => modelId === value); | ||
const duplicateDatatypeId = appMetadata.dataTypes.find((modelId) => modelId.id === value); | ||
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › saves the component when changes are made in the properties header
Check failure on line 57 in frontend/packages/ux-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx GitHub Actions / TestingProperties › Component ID Config › should not invoke handleUpdate when the id is invalid
|
||
if ( | ||
value !== component.id && | ||
(component.type === ComponentType.FileUpload || | ||
|