Skip to content

Commit

Permalink
fix: deprecation warning with angular 7 (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
craftycorvid authored and nnixaa committed Feb 19, 2019
1 parent b4713d9 commit c1558b1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { Component, OnInit, ViewChild } from '@angular/core';
import { NgControl } from '@angular/forms';
import { distinctUntilChanged, debounceTime, skip } from 'rxjs/operators';

import { DefaultFilter } from './default-filter';
Expand All @@ -9,8 +9,8 @@ import { DefaultFilter } from './default-filter';
template: `
<select [ngClass]="inputClass"
class="form-control"
[(ngModel)]="query"
[formControl]="inputControl">
#inputControl
[(ngModel)]="query">
<option value="">{{ column.getFilterConfig().selectText }}</option>
<option *ngFor="let option of column.getFilterConfig().list" [value]="option.value">
Expand All @@ -21,7 +21,7 @@ import { DefaultFilter } from './default-filter';
})
export class SelectFilterComponent extends DefaultFilter implements OnInit {

inputControl = new FormControl();
@ViewChild('inputControl', { read: NgControl }) inputControl: NgControl;

constructor() {
super();
Expand Down

0 comments on commit c1558b1

Please sign in to comment.