spatie / vue-table-component

A straight to the point Vue component to display tables
http://vue-table-component.spatie.be
MIT License
588 stars 149 forks source link

You may have an infinite update loop in a component render function. #117

Closed DouglasMagno closed 6 years ago

DouglasMagno commented 6 years ago

Hi guys! I have a problem. Look. table ` <table-component :data="get" :filter-no-results="translations.translate('no_results')" :show-caption="false" table-class="table table-striped jambo_table bulk_action" filter-input-class="col-md-3" ref="tableAnalytical"

                        <table-column show="UVDDTVEND" :label="translations.translate('UVDDTVEND')" :sortable="false" :filterable="false">
                          <template scope="row">
                            {{helpers.datetimeformat(row.UVDDTVEND+' '+helpers.convertToString(row.UVDHORATRANS))}}
                          </template>
                        </table-column>

                        <table-column show="OPERADORA" :label="translations.translate('OPERADORA')" :sortable="false" :filterable="false"></table-column>   

                        <table-column show="UVDNSU" :label="translations.translate('UVDNSU')" :sortable="false" :filterable="false"></table-column>   

                        <table-column show="UVDAUT" :label="translations.translate('UVDAUT')" :sortable="false" :filterable="false"></table-column>            

                        <table-column show="PLANO" :label="translations.translate('PLANO')" :sortable="false" :filterable="false">
                          <template scope="row">
                            {{translations.translate(row.PLANO)}}
                          </template>
                        </table-column>

                        <table-column show="VBRUTO" :label="translations.translate('VBRUTO')" :sortable="false" :filterable="false" :formatter="helpers.currency"></table-column>                              

                        <table-column show="VTAXA" :label="translations.translate('VTAXA')" :sortable="false" :filterable="false">
                          <template scope="row">
                            <p style="color:red">{{helpers.currency(row.VTAXA)}}</p>
                          </template>
                        </table-column>                              

                        <table-column show="UVDPERTXCALCOP" :label="translations.translate('UVDPERTXCALCOP')" :sortable="false" :filterable="false">
                          <template scope="row">
                            <p style="color:red">{{helpers.percent(row.UVDPERTXCALCOP)}}</p>
                          </template>
                        </table-column>

                        <table-column show="VLIQ" :label="translations.translate('VLIQ')" :sortable="false" :filterable="false" :formatter="helpers.currency"></table-column>

                        <table-column :label="translations.translate('CONC')" :sortable="false" :filterable="false">
                          <template scope="row">
                            {{row.CONC.substring(0,3)}}
                          </template>
                        </table-column>
                        <template slot="tfoot">
                            <tr>
                                <th>{{translations.translate('QTD')}}:</th>
                                <th>{{totals('qtd')}}</th>

                                <th>{{translations.translate('VBRUTO')}}:</th>
                                <th>{{helpers.currency(totals('sumBruto'))}}</th>

                                <th>{{translations.translate('VTAXA')}}:</th>
                                <th>{{helpers.currency(totals('sumTax'))}}</th>

                                <th>{{translations.translate('UVDPERTXCALCOP')}}:</th>
                                <th>{{helpers.percent(totals('avgTax'))}}</th>

                                <th>{{translations.translate('VLIQ')}}:</th>
                                <th>{{helpers.currency(totals('sumLiq'))}}</th>

                                <th><b>&nbsp;</b></th>
                            </tr>
                        </template>
                    </table-component>    `

function get `async get({ page, filter, sort }) {

  let params = this.menu.data();
  params.page = page;
  params.filter = filter;
  params.sort = sort;
  params = JSON.stringify(params);
  const response = await this.paginator.submit("post", "wsanalytical/sales", params, "onSuccess", "onFail");
  return response;

},`

What can it be?