@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
17 lines (16 loc) • 831 B
TypeScript
/**
* 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;