MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / getPrevItem

Function getPrevItem

core/src/components/popover/utils.ts:383–386  ·  view source on GitHub ↗
(items: HTMLIonItemElement[], currentItem: HTMLElement | null)

Source from the content-addressed store, hash-verified

381 * undefined.
382 */
383export const getPrevItem = (items: HTMLIonItemElement[], currentItem: HTMLElement | null) => {
384 const currentItemIndex = getIndexOfItem(items, currentItem);
385 return items[currentItemIndex - 1];
386};
387
388/** Focus the internal button of the ion-item */
389const focusItem = (item: HTMLIonItemElement) => {

Callers 2

util.spec.tsFile · 0.90
callbackFunction · 0.85

Calls 1

getIndexOfItemFunction · 0.85

Tested by

no test coverage detected