@anglr/grid
Version:
Angular module displaying grid
39 lines • 1.91 kB
JavaScript
import { Attribute, Directive, Inject } from '@angular/core';
import { GRID_INSTANCE } from '@anglr/grid';
import * as i0 from "@angular/core";
/**
* Directive that sets metadata selector storage name
*/
export class SelectionStoreDirective {
//######################### constructor #########################
constructor(grid, selectionStore) {
if (!selectionStore) {
throw new Error('SelectionStoreDirective: missing selectionStore value!');
}
grid.gridOptions =
{
plugins: {
metadataSelector: {
options: {
storageName: selectionStore,
},
},
},
};
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: SelectionStoreDirective, deps: [{ token: GRID_INSTANCE }, { token: 'selectionStore', attribute: true }], target: i0.ɵɵFactoryTarget.Directive }); }
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", type: SelectionStoreDirective, isStandalone: true, selector: "[ngGrid][selectionStore], ng-grid[selectionStore]", ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: SelectionStoreDirective, decorators: [{
type: Directive,
args: [{
selector: '[ngGrid][selectionStore], ng-grid[selectionStore]',
}]
}], ctorParameters: () => [{ type: undefined, decorators: [{
type: Inject,
args: [GRID_INSTANCE]
}] }, { type: undefined, decorators: [{
type: Attribute,
args: ['selectionStore']
}] }] });
//# sourceMappingURL=selectionStore.directive.js.map