diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 6b9a2f800..4629f909e 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -5,6 +5,7 @@ Change log **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* +- [11.2.0-dev (TBD)](#1120-dev-tbd) - [11.2.0 (2024-12-29)](#1120-2024-12-29) - [11.1.2 (2024-12-08)](#1112-2024-12-08) - [11.1.1 (2024-11-26)](#1111-2024-11-26) @@ -119,6 +120,9 @@ Change log +## 11.2.0-dev (TBD) +* feat: added `isIgnoreChangeCB()` if changeCB should be ignored due to column change, sizeToContent, loading, etc... + ## 11.2.0 (2024-12-29) * feat: [#2695](https://github.com/gridstack/gridstack.js/issues/2695) 'Esc' to cancel now works on sidebar external items, also works dragging over trash. * feat: [#2852](https://github.com/gridstack/gridstack.js/pull/2852) better React example. Thank you [CNine](https://github.com/Aysnine) diff --git a/src/gridstack.ts b/src/gridstack.ts index f80de8937..f41ead6f2 100644 --- a/src/gridstack.ts +++ b/src/gridstack.ts @@ -974,6 +974,9 @@ export class GridStack { .filter((el: HTMLElement) => el.matches('.' + this.opts.itemClass) && !el.matches('.' + this.opts.placeholderClass)) as GridItemHTMLElement[]; } + /** true if changeCB should be ignored due to column change, sizeToContent, loading, etc... which caller can ignore for dirty flag case */ + public isIgnoreChangeCB(): boolean { return this._ignoreLayoutsNodeChange; } + /** * Destroys a grid instance. DO NOT CALL any methods or access any vars after this as it will free up members. * @param removeDOM if `false` grid and items HTML elements will not be removed from the DOM (Optional. Default `true`).