ActivityDescriptor.instance from child activity differs to id in document list from Overview leads to selected ui problems

node_modules/@com.mgmtp.a12.client/client-core/src/core/view/internal/components/overview-engine.tsx calculates whether the instance of Child ActivityDescriptor equals to any of id in document list from Overview to set it selected.
In normal case, it should work, but in our project, the child activity is Root document (not the CDD), that leads to problem when one row is selected, it does not highlight the row.

// FIXME: This is CRUD logic and belongs to the CRUD component!!!
function getSelectionDocumentId(
	activitiesMap: ActivityMap,
	overviewActivity: Activity,
	documents: (Activity.Data.Document | undefined)[]
): string | undefined {
	const subActivity = ActivityMap.toList(activitiesMap).find(
		activity => activity.initiatingActivityId === overviewActivity.id
	);
	if (subActivity === undefined) {
		return undefined;
	}
	return documents.find(document => subActivity.descriptor.instance === document?.id)?.id;
}


One of the way is still dispatch the instance form document list and custom the DataLoader to actually fetch the Root document but I don’t know whether it’s a good solution.
Does anyone have an idea how to solve this?

Hello @luu-far-shell,

I’m not very experienced on this, but as I checked on the client showcase app [v14.6.0 - only accessible for mgm internal]<INTERNAL_LINK>, I could not reproduce the issue.

Could you please visit the showcase app to check if its matching your case.

Cheers

Thats’ weird, in our case, the CDD docRef is constructed as following format: CMD/RootDM/Id

Hi,

are you using a custom DataLoader/Provider for the overview documents?
By default, the overview loader will remove the modelId from the docRef in case of CDM (for exactly this reason).