akveo / akveo/ng2-smart-table

Warning on filter type list (angular v6)

Đang mở
#1,005 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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ả

Hi everyone,
I'm having an issue when filtering with type list in the smart-table. If I use a filter type list, there's a warning on console_

`forms.js:1193
It looks like you're using ngModel on the same form field as formControl.
Support for using the ngModel input property and ngModelChange event with
reactive form directives has been deprecated in Angular v6 and will be removed
in Angular v7.`

I'm using ng2smart-table with akveo theme (I check it with the base theme of akveo (ngx-admin): http://akveo.com/ngx-admin/#/pages/dashboard), so I've made a fresh install of the theme, and the issue is still there.

I edit settings on smart-table.compontent.ts to add the filter like that:

` settings = {
add: {
addButtonContent: '',
createButtonContent: '',
cancelButtonContent: '',
},
edit: {
editButtonContent: '',
saveButtonContent: '',
cancelButtonContent: '',
},
delete: {
deleteButtonContent: '',
confirmDelete: true,
},
columns: {
id: {
title: 'ID',
type: 'number',
},
firstName: {
title: 'First Name',
type: 'string',
},
lastName: {
title: 'Last Name',
type: 'string',
},
username: {
title: 'Username',
type: 'string',
},
email: {
title: 'E-mail',
type: 'string',
},
age: {
title: 'Age',
type: 'number',
filter: {
type: 'list',
config: {
selectText: 'ALL',
list: [
{value: true, title: "YES"},
{value: false, title: "NO"},
],
},
},
},
},
};`

How can I fix it? I'm afraid it will stop working when I move to Angular7. Somebody could give some light?

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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.