UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

31 lines (30 loc) 886 B
import { IgCollection } from "igniteui-react-core"; import { SyncableObservableCollection$2 } from "igniteui-react-core"; import { Base } from "igniteui-react-core"; export class IgrGridSelectedItemsCollection extends IgCollection { constructor(list) { super(); if (list) { for (let i = 0; i < list.length; i++) { this.add(list[i]); } } } _createInnerColl() { let coll = new SyncableObservableCollection$2(Base.$type, Base.$type, 0); coll.compare = (ext, int) => { let comp = ext; if (comp.equals) { return comp.equals(int); } return comp === int; }; coll.createTo = (ext) => { return ext; }; coll.createFrom = (int) => { return int; }; return coll; } }