Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 加载编辑弹出窗口时ngx datatable非常慢_Angular_Angular5_Ngx Datatable - Fatal编程技术网

Angular 加载编辑弹出窗口时ngx datatable非常慢

Angular 加载编辑弹出窗口时ngx datatable非常慢,angular,angular5,ngx-datatable,Angular,Angular5,Ngx Datatable,我有这样的ngx datatable,我可以编辑弹出窗口中的每一行,在我进入结果的第二页之前一切都很好,这很神奇,当我单击要编辑的行时,我在editCustomer方法中捕捉到断点,但弹出窗口中的数据只有在大约5秒钟后才会刷新,我可以检查什么 <ngx-datatable class="material colored-header sm table table-striped table-hover" [loadingIndicator]="

我有这样的ngx datatable,我可以编辑弹出窗口中的每一行,在我进入结果的第二页之前一切都很好,这很神奇,当我单击要编辑的行时,我在editCustomer方法中捕捉到断点,但弹出窗口中的数据只有在大约5秒钟后才会刷新,我可以检查什么

    <ngx-datatable class="material colored-header sm table table-striped table-hover"
                   [loadingIndicator]="loadingIndicator"
                   [rows]="customers"
                   [rowHeight]="35"
                   [headerHeight]="35"
                   [footerHeight]="35"
                   [columns]="columns"
                   [scrollbarV]="true"
                   [rowClass]="getRowClass"
                   [columnMode]="'force'">
    </ngx-datatable>

    <ng-template #indexTemplate let-value="value">
        <strong>{{value}}</strong>
    </ng-template>

    <ng-template #actionsTemplate let-row="row" let-value="value" let-i="index">

        <a class="btn btn-link btn-xs" href="javascript:;" (click)="editCustomer(row)"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</a>

    </ng-template>


    <div class="modal fade" bsModal #editorModal="bs-modal" (onHidden)="onEditorModalHidden()" [config]="{backdrop: 'static'}" tabindex="-1">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title pull-left"><i class="fa fa-shield"></i> Customer Details </h4>

                    <button type="button" class="close pull-right" title="Close" (click)="editorModal.hide()">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <customer-editor #customerEditor></customer-editor>
                </div>
            </div>
        </div>
    </div>
</div>
客户编辑是

@ViewChild('customerEditor')
customerEditor: CustomerEditorComponent;
在customerEditor中

editCustomer(customer: Customer) {
    if (customer) {

        this.customerEdit = new Customer();
        Object.assign(this.customerEdit, customer);

    }
并且在customerEdit视图中只有
{{customerEdit.name}
这很奇怪,但如果转到表中的第二页,则弹出窗口会在4-5秒后刷新数据


就像在表中更改页面一样,绑定会以角度暂停几秒钟。

好的,我发现了问题,这是lib问题,问题已在最新版本中修复

editCustomer(customer: Customer) {
    if (customer) {

        this.customerEdit = new Customer();
        Object.assign(this.customerEdit, customer);

    }