@websy/websy-designs 1.2.0 → 1.2.2
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.
|
@@ -1414,7 +1414,7 @@ class WebsyDropdown {
|
|
|
1414
1414
|
const item = this.options.items[index]
|
|
1415
1415
|
this.updateHeader(item)
|
|
1416
1416
|
if (item && this.options.onItemSelected) {
|
|
1417
|
-
this.options.onItemSelected(item, this.selectedItems, this.options.items)
|
|
1417
|
+
this.options.onItemSelected(item, this.selectedItems, this.options.items, this.options)
|
|
1418
1418
|
}
|
|
1419
1419
|
if (this.options.closeAfterSelection === true) {
|
|
1420
1420
|
this.close()
|
|
@@ -4480,8 +4480,23 @@ class WebsyTable2 {
|
|
|
4480
4480
|
const tableEl = document.getElementById(`${this.elementId}_table`)
|
|
4481
4481
|
tableEl.style.tableLayout = 'auto'
|
|
4482
4482
|
tableEl.style.width = 'auto'
|
|
4483
|
+
const headEl = document.getElementById(`${this.elementId}_head`)
|
|
4483
4484
|
const bodyEl = document.getElementById(`${this.elementId}_body`)
|
|
4484
|
-
|
|
4485
|
+
headEl.innerHTML = '<tr style="visibility: hidden;">' + values.map((c, i) => `
|
|
4486
|
+
<th>
|
|
4487
|
+
<div class ="tableHeader">
|
|
4488
|
+
<div class="leftSection">
|
|
4489
|
+
<div
|
|
4490
|
+
class="tableHeaderField"
|
|
4491
|
+
>
|
|
4492
|
+
${c.value || 'nbsp;'}
|
|
4493
|
+
</div>
|
|
4494
|
+
</div>
|
|
4495
|
+
${c.searchable === true ? this.buildSearchIcon(i) : ''}
|
|
4496
|
+
</div>
|
|
4497
|
+
</th>
|
|
4498
|
+
`).join('') + '</tr>'
|
|
4499
|
+
bodyEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(c => `
|
|
4485
4500
|
<td
|
|
4486
4501
|
style='height: ${this.options.cellSize}px; line-height: ${this.options.cellSize}px; padding: 10px 5px;'
|
|
4487
4502
|
>${c.value || ' '}</td>
|
package/dist/websy-designs.js
CHANGED
|
@@ -1602,7 +1602,7 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1602
1602
|
this.updateHeader(item);
|
|
1603
1603
|
|
|
1604
1604
|
if (item && this.options.onItemSelected) {
|
|
1605
|
-
this.options.onItemSelected(item, this.selectedItems, this.options.items);
|
|
1605
|
+
this.options.onItemSelected(item, this.selectedItems, this.options.items, this.options);
|
|
1606
1606
|
}
|
|
1607
1607
|
|
|
1608
1608
|
if (this.options.closeAfterSelection === true) {
|
|
@@ -5064,8 +5064,12 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
5064
5064
|
var tableEl = document.getElementById("".concat(this.elementId, "_table"));
|
|
5065
5065
|
tableEl.style.tableLayout = 'auto';
|
|
5066
5066
|
tableEl.style.width = 'auto';
|
|
5067
|
+
var headEl = document.getElementById("".concat(this.elementId, "_head"));
|
|
5067
5068
|
var bodyEl = document.getElementById("".concat(this.elementId, "_body"));
|
|
5068
|
-
|
|
5069
|
+
headEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(function (c, i) {
|
|
5070
|
+
return "\n <th>\n <div class =\"tableHeader\">\n <div class=\"leftSection\">\n <div\n class=\"tableHeaderField\" \n >\n ".concat(c.value || 'nbsp;', "\n </div>\n </div> \n ").concat(c.searchable === true ? _this33.buildSearchIcon(i) : '', "\n </div>\n </th>\n ");
|
|
5071
|
+
}).join('') + '</tr>';
|
|
5072
|
+
bodyEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(function (c) {
|
|
5069
5073
|
return "\n <td \n style='height: ".concat(_this33.options.cellSize, "px; line-height: ").concat(_this33.options.cellSize, "px; padding: 10px 5px;'\n >").concat(c.value || ' ', "</td>\n ");
|
|
5070
5074
|
}).join('') + '</tr>'; // get height of the first data cell
|
|
5071
5075
|
|