将 ngx-datatable 从 升级v11.0.4
到后v11.1.5
,出现错误。
ERROR TypeError: Cannot read property 'length' of null
at DatatableComponent.get [as allRowsSelected] (index.js:4867)
at Object.eval [as updateDirectives] (DatatableComponent.html:18)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:14689)
at checkAndUpdateView (core.js:13836)
at callViewAction (core.js:14187)
at execEmbeddedViewsAction (core.js:14145)
at checkAndUpdateView (core.js:13837)
at callViewAction (core.js:14187)
at execComponentViewsAction (core.js:14119)
at checkAndUpdateView (core.js:13842)
我试图降级v11.1.0
但同样的问题。我的表定义如下所示:
<ngx-datatable
fxFlexFill
#table
class="material striped"
[rows]="rows | async"
[columnMode]="'force'"
[scrollbarV]="true"
[scrollbarH]="true"
[headerHeight]="headerHeight"
[footerHeight]="50"
[rowHeight]="rowHeight"
(scroll)="onScroll($event)"
[selectionType]="'single'"
>
数据是异步的,因此表在初始化时没有数据。有任何想法吗?