akveo / akveo/ng2-smart-table

Warning on filter type list (angular v6)

Ouverte
#1,005 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
1.6k
Forks
867
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.