@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.
|
@@ -1227,7 +1227,7 @@ class WebsyDropdown {
|
|
|
1227
1227
|
const item = this.options.items[index]
|
|
1228
1228
|
this.updateHeader(item)
|
|
1229
1229
|
if (item && this.options.onItemSelected) {
|
|
1230
|
-
this.options.onItemSelected(item, this.selectedItems, this.options.items)
|
|
1230
|
+
this.options.onItemSelected(item, this.selectedItems, this.options.items, this.options)
|
|
1231
1231
|
}
|
|
1232
1232
|
if (this.options.closeAfterSelection === true) {
|
|
1233
1233
|
this.close()
|
|
@@ -4154,8 +4154,23 @@ class WebsyTable2 {
|
|
|
4154
4154
|
const tableEl = document.getElementById(`${this.elementId}_table`)
|
|
4155
4155
|
tableEl.style.tableLayout = 'auto'
|
|
4156
4156
|
tableEl.style.width = 'auto'
|
|
4157
|
+
const headEl = document.getElementById(`${this.elementId}_head`)
|
|
4157
4158
|
const bodyEl = document.getElementById(`${this.elementId}_body`)
|
|
4158
|
-
|
|
4159
|
+
headEl.innerHTML = '<tr style="visibility: hidden;">' + values.map((c, i) => `
|
|
4160
|
+
<th>
|
|
4161
|
+
<div class ="tableHeader">
|
|
4162
|
+
<div class="leftSection">
|
|
4163
|
+
<div
|
|
4164
|
+
class="tableHeaderField"
|
|
4165
|
+
>
|
|
4166
|
+
${c.value || 'nbsp;'}
|
|
4167
|
+
</div>
|
|
4168
|
+
</div>
|
|
4169
|
+
${c.searchable === true ? this.buildSearchIcon(i) : ''}
|
|
4170
|
+
</div>
|
|
4171
|
+
</th>
|
|
4172
|
+
`).join('') + '</tr>'
|
|
4173
|
+
bodyEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(c => `
|
|
4159
4174
|
<td
|
|
4160
4175
|
style='height: ${this.options.cellSize}px; line-height: ${this.options.cellSize}px; padding: 10px 5px;'
|
|
4161
4176
|
>${c.value || ' '}</td>
|
|
@@ -1414,7 +1414,7 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1414
1414
|
this.updateHeader(item);
|
|
1415
1415
|
|
|
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
|
|
|
1420
1420
|
if (this.options.closeAfterSelection === true) {
|
|
@@ -4755,8 +4755,12 @@ var WebsyTable2 = /*#__PURE__*/function () {
|
|
|
4755
4755
|
var tableEl = document.getElementById("".concat(this.elementId, "_table"));
|
|
4756
4756
|
tableEl.style.tableLayout = 'auto';
|
|
4757
4757
|
tableEl.style.width = 'auto';
|
|
4758
|
+
var headEl = document.getElementById("".concat(this.elementId, "_head"));
|
|
4758
4759
|
var bodyEl = document.getElementById("".concat(this.elementId, "_body"));
|
|
4759
|
-
|
|
4760
|
+
headEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(function (c, i) {
|
|
4761
|
+
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 ? _this31.buildSearchIcon(i) : '', "\n </div>\n </th>\n ");
|
|
4762
|
+
}).join('') + '</tr>';
|
|
4763
|
+
bodyEl.innerHTML = '<tr style="visibility: hidden;">' + values.map(function (c) {
|
|
4760
4764
|
return "\n <td \n style='height: ".concat(_this31.options.cellSize, "px; line-height: ").concat(_this31.options.cellSize, "px; padding: 10px 5px;'\n >").concat(c.value || ' ', "</td>\n ");
|
|
4761
4765
|
}).join('') + '</tr>'; // get height of the first data cell
|
|
4762
4766
|
|