renderItems(allowZero) {
    if (!this.data || (!allowZero && this.data.length === 0)) {
      return;
    }
    const startIndex = this.startIndex;
    const endIndex = this.startIndex + this.visibleItemCount();

    if (this.lastStart === startIndex && this.lastEnd === endIndex) {
      return;
    }

    this.lastStart = startIndex;
    this.lastEnd = endIndex;

    const data = this.data.slice(
      startIndex,
      endIndex
    );

    let html = '';
    data.map((item) => {
      const node = this.itemTemplate(item);
      html += node;
      return node;
    });

    if (this.itemContainer) {
      this.itemContainer.style.transform = `translateY(${this.offsetY}px)`;
      this.itemContainer.innerHTML = html;
    }
    const elem = this;
    this.triggerEvent('afterrender', elem, { detail: { elem: this, startIndex, endIndex } });
  }
/**
   * Render the visible section plus the cached data
   * @private
   * @param {boolean} allowZero Allow a zero length dataset (render empty)
   */
Render the visible section plus the cached data
@private
@param {boolean} allowZero Allow a zero length dataset (render empty)
Render the visible section plus the cached data @private @param { boolean } allowZero Allow a zero length dataset ( render empty )
renderItems(allowZero) {
    if (!this.data || (!allowZero && this.data.length === 0)) {
      return;
    }
    const startIndex = this.startIndex;
    const endIndex = this.startIndex + this.visibleItemCount();
    if (this.lastStart === startIndex && this.lastEnd === endIndex) {
      return;
    }
    this.lastStart = startIndex;
    this.lastEnd = endIndex;
    const data = this.data.slice(
      startIndex,
      endIndex
    );
    let html = '';
    data.map((item) => {
      const node = this.itemTemplate(item);
      html += node;
      return node;
    });
    if (this.itemContainer) {
      this.itemContainer.style.transform = `translateY(${this.offsetY}px)`;
      this.itemContainer.innerHTML = html;
    }
    const elem = this;
    this.triggerEvent('afterrender', elem, { detail: { elem: this, startIndex, endIndex } });
  }
renderItems ( allowZero ) { if ( ! this . data || ( ! allowZero && this . data . length === 0 ) ) { return ; } const startIndex = this . startIndex ; const endIndex = this . startIndex + this . visibleItemCount ( ) ; if ( this . lastStart === startIndex && this . lastEnd === endIndex ) { return ; } this . lastStart = startIndex ; this . lastEnd = endIndex ; const data = this . data . slice ( startIndex , endIndex ) ; let html = '' ; data . map ( ( item ) => { const node = this . itemTemplate ( item ) ; html += node ; return node ; } ) ; if ( this . itemContainer ) { this . itemContainer . style . transform = ` ${ this . offsetY } ` ; this . itemContainer . innerHTML = html ; } const elem = this ; this . triggerEvent ( 'afterrender' , elem , { detail : { elem : this , startIndex , endIndex } } ) ; }
Render the visible section plus the cached data
 @private
 @param {boolean} allowZero Allow a zero length dataset (render empty)
Render the visible section plus the cached data @private @param { boolean } allowZero Allow a zero length dataset ( render empty )