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

Method batchUpdate

src/gridstack.ts:833–842  ·  view source on GitHub ↗

* use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient) * and get a single event callback. You will see no changes until `batchUpdate(false)` is called.

(flag = true)

Source from the content-addressed store, hash-verified

831 * and get a single event callback. You will see no changes until `batchUpdate(false)` is called.
832 */
833 public batchUpdate(flag = true): GridStack {
834 this.engine.batchUpdate(flag);
835 if (!flag) {
836 this._updateContainerHeight();
837 this._triggerRemoveEvent();
838 this._triggerAddEvent();
839 this._triggerChangeEvent();
840 }
841 return this;
842 }
843
844 /**
845 * Gets the current cell height in pixels. This takes into account the unit type and converts to pixels if necessary.

Callers 6

constructorMethod · 0.95
loadMethod · 0.95
onResizeMethod · 0.95
resizeToContentCheckMethod · 0.95
removeAsSubGridMethod · 0.45

Calls 4

_triggerRemoveEventMethod · 0.95
_triggerAddEventMethod · 0.95
_triggerChangeEventMethod · 0.95

Tested by

no test coverage detected