UNPKG

@mikezimm/npmfunctions

Version:
17 lines (16 loc) 831 B
/** * This was originally copied from PivotTiles basicElements.tsx file * * Use like this: let thisID = findParentElementPropLikeThis(e.target, 'id', 'ButtonID', 5, 'begins'); * Will find element where id begins wtih ButtonID up to 5 parents up. * @param e * @param prop * @param value * @param maxHops * @param search * @param alertError //Alert on error or not found * @param consoleResult //Console log result element * */ export declare function findParentElementLikeThis(e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact', alertError?: boolean, consoleResult?: boolean): any; export declare function findParentElementPropLikeThis(e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact'): any;