Skip to content

Commit

Permalink
fix: #595
Browse files Browse the repository at this point in the history
  • Loading branch information
mseemann committed Feb 24, 2017
1 parent b290e6b commit 8eec070
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="2.13.2"></a>
# 2.13.2 (2017-02-24)

### Bug Fixes
* [595](https://github.com/mseemann/angular2-mdl/issues/595) (Incorrect typings of mdl table)


<a name="2.13.1"></a>
# 2.13.1 (2017-02-12)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@angular/platform-server": "2.4.8",
"@angular/router": "3.4.8",
"@types/chai": "3.4.35",
"@types/jasmine": "2.5.43",
"@types/jasmine": "2.5.38",
"@types/node": "7.0.5",
"angular2-template-loader": "0.6.2",
"autoprefixer": "6.7.5",
Expand Down Expand Up @@ -73,7 +73,7 @@
"raw-loader": "0.5.1",
"rimraf": "2.6.1",
"rxjs": "5.2.0",
"sass-loader": "6.0.2",
"sass-loader": "4.1.1",
"sourcemap-istanbul-instrumenter-loader": "0.2.0",
"string-replace-loader": "1.0.5",
"style-loader": "0.13.1",
Expand Down
4 changes: 2 additions & 2 deletions src/demo-app/app/tables/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export interface ITableItem extends IMdlTableModelItem {
})
export class TableDemo extends AbstractDemoComponent implements OnInit {

private tableData: [ITableItem] = [
private tableData: ITableItem[] = [
{material: 'Acrylic (Transparent)', quantity: 25, unitPrice: 2.90, selected: true},
{material: 'Plywood (Birch)', quantity: 50, unitPrice: 1.25, selected: false},
{material: 'Laminate (Gold on Blue)', quantity: 10, unitPrice: 2.35, selected: false}
];

protected selected: Array<ITableItem> = new Array<ITableItem>();
protected selected: ITableItem[] = [];

public tableModel = new MdlDefaultTableModel([
{key: 'material', name: 'Material', sortable: true},
Expand Down
14 changes: 7 additions & 7 deletions src/lib/components/table/mdl-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ export interface IMdlTableModelItem {

export interface IMdlTableModel {

columns: [IMdlTableColumn];
data: Array<IMdlTableModelItem>;
columns: IMdlTableColumn[];
data: IMdlTableModelItem[];
}

export class MdlDefaultTableModel implements IMdlTableModel {

public columns: [IMdlTableColumn];
public data: Array<IMdlTableModelItem> = new Array<IMdlTableModelItem>();
public columns: IMdlTableColumn[];
public data: IMdlTableModelItem[] = [];

constructor(columns: [IMdlTableColumn]) {
constructor(columns: IMdlTableColumn[]) {
this.columns = columns;
}

public addAll(data: [IMdlTableModelItem]) {
public addAll(data: IMdlTableModelItem[]) {
this.data.push(...data);
}

Expand Down Expand Up @@ -98,7 +98,7 @@ export class MdlTableComponent {
export class MdlSelectableTableComponent extends MdlTableComponent {

@Input('table-model') public model: IMdlTableModel;
@Input('table-model-selected') public selected: Array<IMdlTableModelItem>;
@Input('table-model-selected') public selected: IMdlTableModelItem[];
@Output('table-model-selectionChanged') public selectionChange = new EventEmitter();

public selectable = true;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular2-mdl",
"version": "2.13.1",
"version": "2.13.2",
"license": "MIT",
"description": "Angular 2 components, directives and styles based on material design lite https://getmdl.io.",
"homepage": "http://mseemann.io/angular2-mdl/",
Expand Down

0 comments on commit 8eec070

Please sign in to comment.