diff --git a/src/actions/action.ts b/src/actions/action.ts index a32a41ab19..43e904ec08 100644 --- a/src/actions/action.ts +++ b/src/actions/action.ts @@ -458,6 +458,7 @@ export class Action extends BaseAction implements IAction, ILocalizableOwner { return this._component; } public dispose(): void { + this.updateCallback = undefined; this.action = undefined; super.dispose(); if (this.popupModel) { diff --git a/src/react/components/action-bar/action-bar.tsx b/src/react/components/action-bar/action-bar.tsx index ffa8ea4988..635b2e8009 100644 --- a/src/react/components/action-bar/action-bar.tsx +++ b/src/react/components/action-bar/action-bar.tsx @@ -46,6 +46,19 @@ export class SurveyActionBar extends SurveyElementBase { this.model.resetResponsivityManager(); } } + componentDidUpdate(prevProps: IActionBarProps, prevState: any): void { + super.componentDidUpdate(prevProps, prevState); + if(prevProps.model == this.props.model) { + return; + } + if (!!this.model.hasActions) { + this.model.resetResponsivityManager(); + const container: HTMLDivElement | null = this.rootRef.current; + if(!!container) { + this.model.initResponsivityManager(container, (callback) => { setTimeout(callback); }); + } + } + } protected getStateElement(): Base { return this.model;