jquery.dgtable 0.6.2 → 0.6.3

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * jquery.dgtable 0.6.2
2
+ * jquery.dgtable 0.6.3
3
3
  * git://github.com/danielgindi/jquery.dgtable.git
4
4
  */
5
5
  'use strict';
@@ -1791,9 +1791,9 @@ const hasInsertAdjacentElement = Element.prototype.insertAdjacentElement !== und
1791
1791
  function insertBefore(el, before, parent) {
1792
1792
  if (!before)
1793
1793
  parent.appendChild(el);else
1794
- if (hasInsertAdjacentElement === true)
1795
- before.insertAdjacentElement('beforebegin', el);else
1796
- parent.insertBefore(el, before);
1794
+ if (hasInsertAdjacentElement === false || el instanceof DocumentFragment)
1795
+ parent.insertBefore(el, before);else
1796
+ before.insertAdjacentElement('beforebegin', el);
1797
1797
  }
1798
1798
 
1799
1799
  /**
@@ -2346,7 +2346,7 @@ class VirtualListHelper {
2346
2346
  }
2347
2347
 
2348
2348
  // Find the element to insert before
2349
- let before = list.childNodes[0];
2349
+ let before = itemParent.childNodes[0];
2350
2350
 
2351
2351
  /** @type DocumentFragment|null */
2352
2352
  let fragment = null;
@@ -3603,7 +3603,7 @@ DGTable.prototype._setupVirtualTable = function () {
3603
3603
  list: p.table,
3604
3604
  itemsParent: p.tbody,
3605
3605
  autoVirtualWrapperWidth: false,
3606
- virtual: true,
3606
+ virtual: o.virtualTable,
3607
3607
  buffer: o.rowsBufferSize,
3608
3608
  estimatedItemHeight: o.estimatedRowHeight ? o.estimatedRowHeight : p.virtualRowHeight || 40,
3609
3609
  itemElementCreatorFn: () => {