1.2.0 • Published 2 years ago

ngx-selection-table v1.2.0

Weekly downloads
20
License
MIT
Repository
github
Last release
2 years ago

ngx-selection-table

npm npm downloads Travis MIT licensed

An Angular 13 module for selecting data from table with checkbox, filter and collapsible/expandable sub title.\ For Angular 6 / 7 support please use older versions.

Installation

npm install ngx-selection-table --save

DEMO

Check out the DEMO for more information!

Usage

Importing The 'ngx-selection-table' Module

import { SelectionTableModule } from 'ngx-selection-table';

@NgModule({
  declarations: [...],
  imports: [
    SelectionTableModule,
    ...
  ],
  providers: [],
  bootstrap: [...]
})
export class AppModule { }

Enabling Selection Table

<ngx-selection-table 
                 (change)="selectItem($event)"
                 [tableSource]="tableSource"
                 [keyColumn]="'ID'"
                 [hiddenColumns]="['_YScaleGroup','TT']"
                 [tooltipColumn]="'TT'"
                 [searchStyle]="'searchAll'"
                 [searchColumn]="'KPI'"
                 [filter]="true"
                 [checkbox]="true"
                 [multiSelection]="true"
                 [clickToSelect]="true">
</ngx-selection-table>

Parameters

NameDescriptionExample
(change)On change function called after the status of checkbox changed(change)="selectItem($event)"
tableSourceSource data of the tabletableSource="tableSource"
keyColumnThe name of the key columnkeyColumn="'ID'"
hiddenColumnsThe columns which need to be hiddenhiddenColumns="'_YScaleGroup','TT'"
tooltipColumnThe column which will be used for tooltiptooltipColumn="'TT'"
searchStyleSearch style of the search input. Supports three types: 'searchAll','searchWithSubHeader', 'searchInChildren'.searchStyle="'searchAll'"
searchColumnthe column which will be searched by the search inputsearchColumn="'KPI'"
filterEnable or disable the search inputfilter="true"
checkboxEnable or disable the checkboxcheckbox="true"
multiSelectionEnable or disable the multiple selectionmultiSelection="true"
clickToSelectEnable or disable clicking the table row to selectclickToSelect="true"

Input data samples:

tableSource =  [
    {ID: 1, KPI: 'Host', header: true},
    {ID: 2, KPI: 'CPU', 'Y-Scale': 100, _YScaleGroup: 0, TT: 'tooltips2'},
    {ID: 3, KPI: 'Resident Memory', 'Y-Scale': 2000000, _YScaleGroup: 1, TT: 'tooltips3'},
    {ID: 4, KPI: 'SQL', header: true},
    {ID: 5, KPI: 'Open Connections', 'Y-Scale': 100, _YScaleGroup: 10,  TT: 'tooltips15'},
    {ID: 6, KPI: 'Internal Connections', 'Y-Scale': 100, _YScaleGroup: 10, TT: 'tooltips16'},
    {ID: 7, KPI: 'Threads', header: true},
    {ID: 8, KPI: 'Active Threads', 'Y-Scale': 50, _YScaleGroup: 12, TT: 'tooltips29'},
    {ID: 9, KPI: 'Waiting Threads', 'Y-Scale': 50, _YScaleGroup: 12,  TT: 'tooltips30'},
  ];

Search Style Samples:

Search StringSearch StyleResult
'Host'searchAll'Host', 'CPU', 'Resident Memory'
'Host'searchWithSubHeader'Host'
'Host'searchInChildrenempty

Todo

  • Support Angular 13
  • ...

License

MIT

1.2.0

2 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.0

6 years ago

1.0.1

6 years ago