Dropdown filter with a textbox than each column filter
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 867
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Is it possible for each column filter to be combined into a dropdown select and a textbox?
So far from I see such as in issue [1827](https://github.com/akveo/ngx-admin/issues/1827#issue-351913374)
```
settings: {
columns: {
age: {
title: 'Age',
editor: {
type: 'list',
config: {
selectText: 'Select',
list: [
{value: '1', title:'Option 1'},
{value: '2', title:'Option 2'},
{value: '3', title:'Option 3'},
{value: '4', title:'Option 4'},
],
},
}
filter: {
type: 'list',
config: {
selectText: 'Select',
list: [
{value: '1', title:'Option 1'},
{value: '2', title:'Option 2'},
{value: '3', title:'Option 3'},
{value: '4', title:'Option 4'},
],
},
},
},
}
}
```
The filter would search for each column. But is it possible to combine all filter into a select and by then
got filtered by the textbox? Example:

Update:
For more clarification, I do manage to get the value from the custom dropdown into the textbox. But, problem is `setFilter` such as in [example](https://akveo.github.io/ng2-smart-table/#/examples/using-filters):
```
onSearch(query: string = '') {
this.source.setFilter([
// fields we want to include in the search
{
field: 'id',
search: query
},
{
field: 'name',
search: query
},
{
field: 'username',
search: query
},
{
field: 'email',
search: query
}
], false);
// second parameter specifying whether to perform 'AND' or 'OR' search
// (meaning all columns should contain search query or at least one)
// 'AND' by default, so changing to 'OR' by setting false here
}
```
was unable to be customized to only filter a field depending on selected value.
I've tried to use
```
{
field: value,
search: query
}
```
where value is the selected value but no avail.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.