title: Clear cell edit when change list
body: <p>when I reset and change the parameters to my tables I want to reset the cell edit because when I change the table de row edition keep going active.</p>
  
  <p>This is my code when the list is changed.</p>
  
  <pre><code>@ViewChild('table', {static: true}) private _table;
  </code></pre>
  
  <pre><code>this.listservice.getConfiguration(this.param)
        .subscribe(result =&gt; {
          result.data.forEach((element, index) =&gt; {
              resultData.push({id : index, element, ...element});
          });
          this._table.closeCellEdit(); // this is the funcion close cell 
          this.title = result.config.description;
          this.cols = result.config.cols;
          this.rows = resultData;
          this.selectedColumns = this.cols;
          this.numberElements = this.rows.length;
          this.optionsTypecontrol(this.cols);
          this.clonedRow = {};
      });
  </code></pre>
  
  <p>And this is the error log</p>
  
  <pre><code>ERROR TypeError: this._table.closeCellEdit is not a function
      at SafeSubscriber._next (list.component.ts:98)
      at SafeSubscriber.__tryOrUnsub (Subscriber.js:183)
      at SafeSubscriber.next (Subscriber.js:122)
      at Subscriber._next (Subscriber.js:72)
      at Subscriber.next (Subscriber.js:49)
      at MergeMapSubscriber.notifyNext (mergeMap.js:69)
      at InnerSubscriber._next (InnerSubscriber.js:11)
      at InnerSubscriber.next (Subscriber.js:49)
      at Observable._subscribe (subscribeToArray.js:3)
      at Observable._trySubscribe (Observable.js:42)
  </code></pre>
  
  <p>This is not exactly my code, but is the oficial from primng and is the same structure. I put this because my original code is very long.</p>
  
  <pre><code>&lt;p-table [value]="cars" dataKey="vin" editMode="row"&gt;
      &lt;ng-template pTemplate="header"&gt;
          &lt;tr&gt;
              &lt;th&gt;Vin&lt;/th&gt;
              &lt;th&gt;Year&lt;/th&gt;
              &lt;th&gt;Brand&lt;/th&gt;
              &lt;th&gt;Color&lt;/th&gt;
              &lt;th style="width:8em"&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
      &lt;ng-template pTemplate="body" let-rowData let-editing="editing" let-ri="rowIndex"&gt;
          &lt;tr [pEditableRow]="rowData"&gt;
              &lt;td&gt;
                  {{rowData.vin}}
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;p-cellEditor&gt;
                      &lt;ng-template pTemplate="input"&gt;
                          &lt;input pInputText type="text" [(ngModel)]="rowData.year" year&gt;
                      &lt;/ng-template&gt;
                      &lt;ng-template pTemplate="output"&gt;
                          {{rowData.year}}
                      &lt;/ng-template&gt;
                  &lt;/p-cellEditor&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;p-cellEditor&gt;
                      &lt;ng-template pTemplate="input"&gt;
                          &lt;p-dropdown [options]="brands" [(ngModel)]="rowData.brand" [style]="{'width':'100%'}"&gt;&lt;/p-dropdown&gt;
                      &lt;/ng-template&gt;
                      &lt;ng-template pTemplate="output"&gt;
                          {{rowData.brand}}
                      &lt;/ng-template&gt;
                  &lt;/p-cellEditor&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;p-cellEditor&gt;
                      &lt;ng-template pTemplate="input"&gt;
                          &lt;input pInputText type="text" [(ngModel)]="rowData.color"&gt;
                      &lt;/ng-template&gt;
                      &lt;ng-template pTemplate="output"&gt;
                          {{rowData.color}}
                      &lt;/ng-template&gt;
                  &lt;/p-cellEditor&gt;
              &lt;/td&gt;
              &lt;td style="text-align:center"&gt;
                  &lt;button *ngIf="!editing" pButton type="button" pInitEditableRow icon="pi pi-pencil" class="ui-button-info" (click)="onRowEditInit(rowData)"&gt;&lt;/button&gt;
                  &lt;button *ngIf="editing" pButton type="button" pSaveEditableRow icon="pi pi-check" class="ui-button-success" style="margin-right: .5em" (click)="onRowEditSave(rowData)"&gt;&lt;/button&gt;
                  &lt;button *ngIf="editing" pButton type="button" pCancelEditableRow icon="pi pi-times" class="ui-button-danger" (click)="onRowEditCancel(rowData, ri)"&gt;&lt;/button&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
  &lt;/p-table&gt;
  </code></pre>
  
  <p>The only thing you have to look at this html is the element html </p>
  
  <pre><code>&lt;p-cellEditor&gt; 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;button *ngIf="editing" pButton type="button" pCancelEditableRow icon="pi pi-times" class="ui-button-danger closeedit" (click)="onRowEditCancel(rowData, ri)"&gt;&lt;/button&gt;
  </code></pre>