tosijs-ui 1.5.22 → 1.5.24

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.
@@ -1008,7 +1008,6 @@ export class TosiTable extends WebComponent {
1008
1008
  buildRow(item, cols, stickyInfo, rowClass = 'tr') {
1009
1009
  const cells = cols.map((col, i) => this.buildCell(col, i, stickyInfo[i], item));
1010
1010
  const selectBindingFn = this.selectBinding;
1011
- const tableInst = this;
1012
1011
  const props = { class: rowClass };
1013
1012
  // `item` here is the placeholder proxy from template-build time. The
1014
1013
  // actual stamped row's item is delivered to toDOM as the second arg
@@ -1019,7 +1018,7 @@ export class TosiTable extends WebComponent {
1019
1018
  binding: {
1020
1019
  toDOM: (rowEl, value) => {
1021
1020
  selectBindingFn(rowEl, value);
1022
- const fn = tableInst.rowRendered;
1021
+ const fn = this.rowRendered;
1023
1022
  if (fn) {
1024
1023
  fn(value, Array.from(rowEl.children));
1025
1024
  }
@@ -1116,7 +1115,7 @@ export class TosiTable extends WebComponent {
1116
1115
  const cols = this.visibleColumns;
1117
1116
  const rightScroll = scrollWidth - clientWidth - scrollLeft;
1118
1117
  let boundaryX = 0;
1119
- return cols.find((options, i) => {
1118
+ return cols.find((options) => {
1120
1119
  if (options.visible === false)
1121
1120
  return false;
1122
1121
  boundaryX += options.width;
package/dist/form.js CHANGED
@@ -571,12 +571,18 @@ export class TosiField extends XinComponent {
571
571
  }
572
572
  setElementValue(valueHolder, this.value);
573
573
  setElementValue(input.children[0], this.value);
574
- this.prefix
575
- ? field.setAttribute('prefix', this.prefix)
576
- : field.removeAttribute('prefix');
577
- this.suffix
578
- ? field.setAttribute('suffix', this.suffix)
579
- : field.removeAttribute('suffix');
574
+ if (this.prefix) {
575
+ field.setAttribute('prefix', this.prefix);
576
+ }
577
+ else {
578
+ field.removeAttribute('prefix');
579
+ }
580
+ if (this.suffix) {
581
+ field.setAttribute('suffix', this.suffix);
582
+ }
583
+ else {
584
+ field.removeAttribute('suffix');
585
+ }
580
586
  valueHolder.classList.toggle('hidden', input.children.length > 0);
581
587
  if (input.children.length > 0) {
582
588
  valueHolder.setAttribute('tabindex', '-1');
@@ -633,7 +639,7 @@ export class TosiForm extends XinComponent {
633
639
  try {
634
640
  this.value = JSON.parse(this.value);
635
641
  }
636
- catch (e) {
642
+ catch {
637
643
  console.log('<tosi-form> could not use its value, expects valid JSON');
638
644
  this.value = {};
639
645
  }