ninegrid2 6.391.0 → 6.393.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.
@@ -90,6 +90,12 @@ class aiMessage extends HTMLElement
90
90
  #init = () => {
91
91
 
92
92
  const rowCount = Number(this.getAttribute("row-count"));
93
+ if (rowCount < 1) {
94
+ this.shadowRoot.querySelector(".grid").style.display = "none";
95
+ this.shadowRoot.querySelector(".chat-menu").style.display = "none";
96
+ return;
97
+ }
98
+
93
99
  const html = `
94
100
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
95
101
  <table>
@@ -252,7 +258,7 @@ class aiChat extends HTMLElement
252
258
 
253
259
  el = document.createElement("nx-ai-message");
254
260
  el.setAttribute("message", message);
255
- el.setAttribute("row-count", data.length);
261
+ el.setAttribute("row-count", data ? data.length : 0);
256
262
  //el.data = data;
257
263
  el.initialize(data);
258
264
  target.appendChild(el);
@@ -27436,6 +27436,12 @@ class aiMessage extends HTMLElement
27436
27436
  #init = () => {
27437
27437
 
27438
27438
  const rowCount = Number(this.getAttribute("row-count"));
27439
+ if (rowCount < 1) {
27440
+ this.shadowRoot.querySelector(".grid").style.display = "none";
27441
+ this.shadowRoot.querySelector(".chat-menu").style.display = "none";
27442
+ return;
27443
+ }
27444
+
27439
27445
  const html = `
27440
27446
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
27441
27447
  <table>
@@ -27598,7 +27604,7 @@ class aiChat extends HTMLElement
27598
27604
 
27599
27605
  el = document.createElement("nx-ai-message");
27600
27606
  el.setAttribute("message", message);
27601
- el.setAttribute("row-count", data.length);
27607
+ el.setAttribute("row-count", data ? data.length : 0);
27602
27608
  //el.data = data;
27603
27609
  el.initialize(data);
27604
27610
  target.appendChild(el);
@@ -27434,6 +27434,12 @@ class aiMessage extends HTMLElement
27434
27434
  #init = () => {
27435
27435
 
27436
27436
  const rowCount = Number(this.getAttribute("row-count"));
27437
+ if (rowCount < 1) {
27438
+ this.shadowRoot.querySelector(".grid").style.display = "none";
27439
+ this.shadowRoot.querySelector(".chat-menu").style.display = "none";
27440
+ return;
27441
+ }
27442
+
27437
27443
  const html = `
27438
27444
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
27439
27445
  <table>
@@ -27596,7 +27602,7 @@ class aiChat extends HTMLElement
27596
27602
 
27597
27603
  el = document.createElement("nx-ai-message");
27598
27604
  el.setAttribute("message", message);
27599
- el.setAttribute("row-count", data.length);
27605
+ el.setAttribute("row-count", data ? data.length : 0);
27600
27606
  //el.data = data;
27601
27607
  el.initialize(data);
27602
27608
  target.appendChild(el);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.391.0",
4
+ "version": "6.393.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -90,6 +90,12 @@ class aiMessage extends HTMLElement
90
90
  #init = () => {
91
91
 
92
92
  const rowCount = Number(this.getAttribute("row-count"));
93
+ if (rowCount < 1) {
94
+ this.shadowRoot.querySelector(".grid").style.display = "none";
95
+ this.shadowRoot.querySelector(".chat-menu").style.display = "none";
96
+ return;
97
+ }
98
+
93
99
  const html = `
94
100
  <nine-grid class="ai" display-row-count="${rowCount > 5 ? 5 : rowCount}" show-title-bar="false" show-menu-icon="false" show-status-bar="false" select-type="row" auto-fit-col="true" show-title-bar="true" show-menu-icon="true" show-status-bar="true" enable-fixed-col="true" row-resizable="false" col-movable="true">
95
101
  <table>
@@ -252,7 +258,7 @@ class aiChat extends HTMLElement
252
258
 
253
259
  el = document.createElement("nx-ai-message");
254
260
  el.setAttribute("message", message);
255
- el.setAttribute("row-count", data.length);
261
+ el.setAttribute("row-count", data ? data.length : 0);
256
262
  //el.data = data;
257
263
  el.initialize(data);
258
264
  target.appendChild(el);