fix(table): remove search field

This commit is contained in:
nixa 2016-08-23 14:11:25 +03:00
parent 0f9169fdd0
commit bfab17bd43
3 changed files with 1 additions and 37 deletions

View file

@ -41,7 +41,7 @@
"ng2-bootstrap": "^1.0.20", "ng2-bootstrap": "^1.0.20",
"ng2-branchy": "^0.0.2-5", "ng2-branchy": "^0.0.2-5",
"ng2-ckeditor": "^1.0.4", "ng2-ckeditor": "^1.0.4",
"ng2-smart-table": "^0.1.5", "ng2-smart-table": "^0.1.6",
"ng2-uploader": "0.5.6", "ng2-uploader": "0.5.6",
"normalize.css": "^4.1.1", "normalize.css": "^4.1.1",
"rxjs": "5.0.0-beta.6", "rxjs": "5.0.0-beta.6",

View file

@ -66,33 +66,4 @@ export class SmartTables {
this.source.load(data); this.source.load(data);
}); });
} }
onSearch(): void {
this.source.setFilter([
{
field: 'id',
search: this.query
},
{
field: 'firstName',
search: this.query
},
{
field: 'lastName',
search: this.query
},
{
field: 'username',
search: this.query
},
{
field: 'email',
search: this.query
},
{
field: 'age',
search: this.query
}
], false);
}
} }

View file

@ -2,13 +2,6 @@
<div class="row"> <div class="row">
<ba-card title="Basic Example" baCardClass="with-scroll"> <ba-card title="Basic Example" baCardClass="with-scroll">
<div class="row">
<div class="form-group col-sm-3 col-xs-6">
<input type="text" class="form-control" placeholder="Search" [(ngModel)]="query" (keydown.enter)="onSearch()">
</div>
<button type="submit" class="btn btn-primary" (click)="onSearch()">Search</button>
</div>
<ng2-smart-table [settings]="settings" [source]="source"></ng2-smart-table> <ng2-smart-table [settings]="settings" [source]="source"></ng2-smart-table>
</ba-card> </ba-card>
</div> </div>