How to update Heading in the widget map in 2022.06

Question on behalf of @jeanpierre-golden-knoll:

Hi, sorry I have another issue with the upgrade ^^"
previously we where using the DefaultHeading and the additionalControls property to add a component we made (a close button). The attribute doesn’t seem to exist anymore in the Heading

function createCustomWidgetFactory(activityId: string): Partial<Factory> {
  return {
    Heading(props: Heading.PropsType) {
      const DefaultHeading = Factory.defaultInstance.Heading;
      return <DefaultHeading {...props} additionalControls={<CloseButton activityId={activityId} />} />;
    },
  }; 

What is the proper way to update the Heading in the widget map ?

Hello,

In 202206 you now use the componentMap property of the overview component rather than factory. You can find more info on getA12 here.

It might now look something like…

const componentMap: ComponentMap = {
	...DefaultComponentMap,
	Heading(headingProps) {
		return <DefaultComponentMap.Heading {...headingProps} additionalControls={something} />;
	}
};

Does that help?

The ide stopped complaining, it seems to resolve the issue. thx