mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-21 18:00:13 +01:00
fix(table): remove search field
This commit is contained in:
parent
0f9169fdd0
commit
bfab17bd43
3 changed files with 1 additions and 37 deletions
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue