2

I'm using ngx-easy-table. There is an input filter that I want to get value on keyup. Already looked at documentation, and not find anything that can help-me.

Anyone knows anything about this?

<ngx-table [configuration]="configuration" [data]="rows" [columns]="columns"
           [noResultsTemplate]="noResultsTemplate">
  <ng-template let-row>
    <td>
      <div>{{row.orgaosigla}}</div>
    </td>
    <td>
      <div>{{row.itpanobjeto | truncatetext:50 }}</div>
    </td>
    <td>
      <div>{{float(row.itpanvalorestimadototal) | currencyformat }}</div>
    </td>
    <td>
      <div *ngIf="row.itpanmes">{{ mes(row.itpanmes) }}</div>
    </td>
    <td>
      <div>{{row.priordescricao}}</div>
    </td>
    <td>
      <div>{{row.obestdescricao}}</div>
    </td>
    <td>
      <div>{{row.stipadescricao}}</div>
    </td>
    <td>
      <div>
        <a matTooltip="Excluir o Vínculo " (click)="deletar(row)" matTooltipClass="tooltip-azul"
           matTooltipPosition="above"
           class="mr-2 mouseHover">
          <mat-icon class="material-icons delete">link_off</mat-icon>
        </a>
      </div>
    </td>
  </ng-template>
</ngx-table>

The table.

public columns: Columns[] = [
  { key: 'orgaosigla', title: 'Unidade - Sigla' },
  { key: 'itpanobjeto', title: 'Objeto' },
  { key: 'itpanvalorestimadototal', title: 'Valor Estimado (R$)' },
  { key: 'itpanmes', title: 'Mês a Contratar' },
  { key: 'priordescricao', title: 'Grau de Prioridade' },
  { key: 'obestdescricao', title: 'Objetivo Estratégico' },
  { key: 'stipadescricao', title: 'Situação' },
  { key: 'actions', title: 'Ações', searchEnabled: false },
];

The input that I want to get the value on keyup is itpanvalorestimadototal.

ssuperczynski
  • 3,190
  • 3
  • 44
  • 61
  • i don't quite understand; is the column `itpanvalorestimadototal` editable and you want to get the value of the current cell that is edited for that column? – Chirag Patel Jan 07 '20 at 15:47
  • No, the column, is not editable, above the values of columns, has a input that make the filter by column, I want to get this value and make some actions. Do you understand? –  Jan 08 '20 at 14:49

2 Answers2

1

Author here. If you'd like to access the additional events, just use the output (event), like here shown on the click example:

Table emits all the events through (event) output.

ssuperczynski
  • 3,190
  • 3
  • 44
  • 61
0

i Couldn't see any event to bind to within the documentation, however you can do what you want using Custom Filters: https://github.com/ssuperczynski/ngx-easy-table/blob/master/src/app/demo/custom-filters/custom-filters.component.ts

Code: https://github.com/ssuperczynski/ngx-easy-table/tree/master/src/app/demo/custom-filters.

Unfortunately this does just mean you are just adding your own text boxes (or some input) which does not sit within the table itself.

Chirag Patel
  • 364
  • 2
  • 12