drag-select-table
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

NgDragSelectTable

NPM

NPM Version NPM Downloads Node Version

angular 6 component

预览图

This project is a Demo, you can clone it to build.
Public component in projects folder

Install

npm install drag-select-table --save
or
yarn add drag-select-table

Usage

import { DragSelectTableModule } from 'drag-select-table';
 
@NgModule({
  imports: [
    ...
    DragSelectTableModule
  ],
})

simple

It's 5 row and 5 column as default.

<ds-table></ds-table>

emit valuesChange

import { Component } from '@angular/core';
 
@Component({
    selector: 'drag-select-table-demo',
    template: `<ds-table [row]="row" [column]="col" (valuesChange)="updateValues($event)"></ds-table>`
})
export class MultiSelectTableDemo {
    public row = 7;
    public col = 7;
 
    public updateValues(values) {
        console.log(values);
    }
}

bidirectional bindings

import { Component } from '@angular/core';
 
@Component({
    selector: 'drag-select-table-demo',
    template: `<ds-table [row]="row" [column]="col" [(values)]="resTable"></ds-table>`
})
export class MultiSelectTableDemo {
    public row = 7;
    public col = 7;
    public resTable = [];
}

Demo Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Demo Build

MIT License

Copyright (c) 2018 kai

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i drag-select-table

    Weekly Downloads

    1

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    198 kB

    Total Files

    35

    Last publish

    Collaborators

    • kavil-npm