diff --git a/packages/preview-middleware-client/src/adp/quick-actions/fe-v4/utils.ts b/packages/preview-middleware-client/src/adp/quick-actions/fe-v4/utils.ts index e622c0bf2e..5c0f571bd3 100644 --- a/packages/preview-middleware-client/src/adp/quick-actions/fe-v4/utils.ts +++ b/packages/preview-middleware-client/src/adp/quick-actions/fe-v4/utils.ts @@ -3,7 +3,6 @@ import FlexCommand from 'sap/ui/rta/command/FlexCommand'; import { QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition'; import CommandFactory from 'sap/ui/rta/command/CommandFactory'; import { getAppComponent, getPageName, getReference } from '../../../utils/fe-v4'; -import ManagedObject from 'sap/ui/base/ManagedObject'; export async function executeToggleAction( context: QuickActionContext, @@ -52,20 +51,3 @@ export async function executeToggleAction( return []; } - -/** - * Recursively searches element (Managed Object) parents by id - * @param el element to search parents - * @param id parent id to search - * @returns parent element with the given id, if found, otherwise undefined - */ -export function findParentById(el: ManagedObject, id: string): ManagedObject | undefined { - const parent = el.getParent(); - if (!parent) { - return undefined; - } else if (parent.getId() === id) { - return parent; - } else { - return findParentById(parent, id); - } -}