Posted 14 September 2017, 12:00 pm EST
Hi there
We are using FlexGrid in our product and I’ve noticed something which looks like a bug.
When I supply CollectionView as a itemsSource, no cell is selected by default.
When I however do this:
<div *ngFor="let data of observableList | async"> <wj-flex-grid [itemsSource]="data"></wj-flex-grid> </div>
For each grid top left cell is selected.
How come different data source do this and how to avoid this? Currently my workaround looks ugly and probably have some impact on performance:
private gridDataArr = new ObservableArray() private gridData = new CollectionView(this.gridDataArr); ngOnInit() { this.gridDataArr.beginUpdate(); this.gridDataArr.clear(); this.gridDataArr.push(...data); this.gridDataArr.endUpdate(); }
And then in template
<wj-flex-grid [itemsSource]="gridData"></wj-flex-grid>So in other words, I’m getting the data and add it to ObservableArray (haven’t found better way than clear/push).
And while I’m already here, additional question. Is there an easy way to allow regular selecting? So that user can click and drag a mouse, just like selecting any text on a webpage?
Thanks in advance.