MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / getGridItems

Method getGridItems

src/gridstack.ts:1092–1095  ·  view source on GitHub ↗

* Returns an array of grid HTML elements (no placeholder) - used to iterate through our children in DOM order. * This method excludes placeholder elements and returns only actual grid items. * * @returns array of GridItemHTMLElement instances representing all grid items * * @example

()

Source from the content-addressed store, hash-verified

1090 * });
1091 */
1092 public getGridItems(): GridItemHTMLElement[] {
1093 return Array.from(this.el.children)
1094 .filter((el: HTMLElement) => el.matches('.' + this.opts.itemClass) && !el.matches('.' + this.opts.placeholderClass)) as GridItemHTMLElement[];
1095 }
1096
1097 /**
1098 * Returns true if change callbacks should be ignored due to column change, sizeToContent, loading, etc.

Callers 2

constructorMethod · 0.95
modifyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected