Skip to content

Releases: mfuu/ngx-virtual-dnd-list

v13.0.6

18 Jan 13:47
Compare
Choose a tag to compare

Changes

  • fix: animation failure in prod env

v13.0.5

08 Jan 13:15
Compare
Choose a tag to compare

Changes

  • feat: tableMode support

v13.0.4

14 Jun 03:16
Compare
Choose a tag to compare

Changes

  • angular 13.x support, usage:

virutal-list.module.ts

...
import { VirtualDndListModule } from 'ngx-virtual-dnd-list';

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    VirtualDndListModule
  ],
  providers: []
})
export class VirtualListModule { }

virutal-list.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'virutal-list',
  template: `
    <div #scroller>
      <div
        virtual-dnd-list
        [scroller]="scroller"
        [dataKey]="'id'"
        [(ngModel)]="list"
      >
        <ng-template let-item let-index="index">
          <div class="item">
            <span>{{ index }}</span>
            <p>{{ item.text }}</p>
          </div>
        </ng-template>
      </div>
    </div>
  `,
  styles: [],
})
export class VirtualListComponent {
  public list = [
    { id: 'a', text: 'aaa' },
    { id: 'b', text: 'bbb' },
    { id: 'c', text: 'ccc' },
    ...
  ];
}