ninegrid2 6.733.0 → 6.735.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120957,28 +120957,16 @@ class nxTab extends HTMLElement {
120957
120957
  };
120958
120958
 
120959
120959
  #init = () => {
120960
- const observer = new MutationObserver(() => {
120961
- console.log("1111");
120960
+ const resizeObserver = new ResizeObserver(() => {
120961
+ console.log("111");
120962
120962
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
120963
120963
  if (activeContent) {
120964
120964
  this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
120965
120965
  }
120966
120966
  });
120967
120967
 
120968
- this.shadowRoot.querySelector('.tab-pages');
120969
-
120970
-
120971
120968
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
120972
-
120973
- console.log(activeContent);
120974
-
120975
- if (activeContent) {
120976
- observer.observe(activeContent, {
120977
- childList: true,
120978
- subtree: true,
120979
- characterData: true
120980
- });
120981
- }
120969
+ if (activeContent) resizeObserver.observe(activeContent);
120982
120970
  };
120983
120971
  }
120984
120972
 
@@ -120953,28 +120953,16 @@ class nxTab extends HTMLElement {
120953
120953
  };
120954
120954
 
120955
120955
  #init = () => {
120956
- const observer = new MutationObserver(() => {
120957
- console.log("1111");
120956
+ const resizeObserver = new ResizeObserver(() => {
120957
+ console.log("111");
120958
120958
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
120959
120959
  if (activeContent) {
120960
120960
  this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
120961
120961
  }
120962
120962
  });
120963
120963
 
120964
- this.shadowRoot.querySelector('.tab-pages');
120965
-
120966
-
120967
120964
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
120968
-
120969
- console.log(activeContent);
120970
-
120971
- if (activeContent) {
120972
- observer.observe(activeContent, {
120973
- childList: true,
120974
- subtree: true,
120975
- characterData: true
120976
- });
120977
- }
120965
+ if (activeContent) resizeObserver.observe(activeContent);
120978
120966
  };
120979
120967
  }
120980
120968
 
package/dist/nx/nxTab.js CHANGED
@@ -109,28 +109,16 @@ class nxTab extends HTMLElement {
109
109
  };
110
110
 
111
111
  #init = () => {
112
- const observer = new MutationObserver(() => {
113
- console.log("1111")
112
+ const resizeObserver = new ResizeObserver(() => {
113
+ console.log("111");
114
114
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
115
115
  if (activeContent) {
116
116
  this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
117
117
  }
118
118
  });
119
119
 
120
- const tabPages = this.shadowRoot.querySelector('.tab-pages');
121
-
122
-
123
120
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
124
-
125
- console.log(activeContent);
126
-
127
- if (activeContent) {
128
- observer.observe(activeContent, {
129
- childList: true,
130
- subtree: true,
131
- characterData: true
132
- });
133
- }
121
+ if (activeContent) resizeObserver.observe(activeContent);
134
122
  };
135
123
  }
136
124
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.733.0",
4
+ "version": "6.735.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
package/src/nx/nxTab.js CHANGED
@@ -109,28 +109,16 @@ class nxTab extends HTMLElement {
109
109
  };
110
110
 
111
111
  #init = () => {
112
- const observer = new MutationObserver(() => {
113
- console.log("1111")
112
+ const resizeObserver = new ResizeObserver(() => {
113
+ console.log("111");
114
114
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
115
115
  if (activeContent) {
116
116
  this.shadowRoot.querySelector('.tab-pages').style.height = `${activeContent.scrollHeight}px`;
117
117
  }
118
118
  });
119
119
 
120
- const tabPages = this.shadowRoot.querySelector('.tab-pages');
121
-
122
-
123
120
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
124
-
125
- console.log(activeContent);
126
-
127
- if (activeContent) {
128
- observer.observe(activeContent, {
129
- childList: true,
130
- subtree: true,
131
- characterData: true
132
- });
133
- }
121
+ if (activeContent) resizeObserver.observe(activeContent);
134
122
  };
135
123
  }
136
124