Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vadson71 committed Jan 30, 2025
1 parent a62d63c commit 07210f7
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
}

0 comments on commit 07210f7

Please sign in to comment.