Skip to content

Commit

Permalink
fix(table): make source input property properly annotated as DataSo…
Browse files Browse the repository at this point in the history
…urce in dependent components (#332)
  • Loading branch information
Deilan authored and lexzhukov committed May 1, 2017
1 parent 54e9884 commit 9be34fc
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';

import { Grid } from '../../../lib/grid';
import { Row } from '../../../lib/data-set/row';
import { DataSource } from '../../../lib/data-source/data-source';

@Component({
selector: 'ng2-st-tbody-edit-delete',
Expand All @@ -16,7 +17,7 @@ export class TbodyEditDeleteComponent {

@Input() grid: Grid;
@Input() row: Row;
@Input() source: any;
@Input() source: DataSource;
@Input() deleteConfirm: EventEmitter<any>;
@Input() editConfirm: EventEmitter<any>;

Expand Down
3 changes: 2 additions & 1 deletion src/ng2-smart-table/components/tbody/tbody.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';

import { Grid } from '../../lib/grid';
import { DataSource } from '../../lib/data-source/data-source';

@Component({
selector: '[ng2-st-tbody]',
Expand All @@ -10,7 +11,7 @@ import { Grid } from '../../lib/grid';
export class Ng2SmartTableTbodyComponent {

@Input() grid: Grid;
@Input() source: any;
@Input() source: DataSource;
@Input() deleteConfirm: EventEmitter<any>;
@Input() editConfirm: EventEmitter<any>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, Output, EventEmitter, AfterViewInit, ElementRef } from '@angular/core';

import { Grid } from '../../../lib/grid';
import { DataSource } from '../../../lib/data-source/data-source';

@Component({
selector: '[ng2-st-add-button]',
Expand All @@ -12,7 +13,7 @@ import { Grid } from '../../../lib/grid';
export class AddButtonComponent implements AfterViewInit {

@Input() grid: Grid;
@Input() source: any;
@Input() source: DataSource;
@Output() create = new EventEmitter<any>();

constructor(private ref: ElementRef) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input } from '@angular/core';

import { Grid } from '../../../lib/grid';
import { DataSource } from '../../../lib/data-source/data-source';

@Component({
selector: '[ng2-st-checkbox-select-all]',
Expand All @@ -11,6 +12,6 @@ import { Grid } from '../../../lib/grid';
export class CheckboxSelectAllComponent {

@Input() grid: Grid;
@Input() source: any;
@Input() source: DataSource;
@Input() isAllSelected: boolean;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';

import { Column } from '../../../lib/data-set/column';
import { DataSource } from '../../../lib/data-source/data-source';

@Component({
selector: 'ng2-st-column-title',
Expand All @@ -13,7 +14,7 @@ import { Column } from '../../../lib/data-set/column';
export class ColumnTitleComponent {

@Input() column: Column;
@Input() source: any;
@Input() source: DataSource;

@Output() sort = new EventEmitter<any>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';

import { Grid } from '../../../lib/grid';
import { DataSource } from '../../../lib/data-source/data-source';

@Component({
selector: '[ng2-st-thead-filters-row]',
Expand All @@ -27,7 +28,7 @@ import { Grid } from '../../../lib/grid';
export class TheadFitlersRowComponent {

@Input() grid: Grid;
@Input() source: any;
@Input() source: DataSource;

@Output() create = new EventEmitter<any>();
@Output() filter = new EventEmitter<any>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';

import { Grid } from '../../../lib/grid';
import { DataSource } from '../../../lib/data-source/data-source';

@Component({
selector: '[ng2-st-thead-titles-row]',
Expand All @@ -23,7 +24,7 @@ export class TheadTitlesRowComponent {

@Input() grid: Grid;
@Input() isAllSelected: boolean;
@Input() source: any;
@Input() source: DataSource;

@Output() sort = new EventEmitter<any>();
@Output() selectAllRows = new EventEmitter<any>();
Expand Down
3 changes: 2 additions & 1 deletion src/ng2-smart-table/components/thead/thead.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';

import { Grid } from '../../lib/grid';
import { DataSource } from '../../lib/data-source/data-source';

@Component({
selector: '[ng2-st-thead]',
Expand All @@ -9,7 +10,7 @@ import { Grid } from '../../lib/grid';
export class Ng2SmartTableTheadComponent {

@Input() grid: Grid;
@Input() source: any;
@Input() source: DataSource;
@Input() isAllSelected: boolean;
@Input() createConfirm: EventEmitter<any>;

Expand Down

0 comments on commit 9be34fc

Please sign in to comment.