projects/i-components/src/lib/components/xam-grid-settings/xam-grid-row-selector.component.ts
Xam grid row selection settings as template.
selector | wm-row-selector-settings |
template |
|
Properties |
|
Inputs |
enableRowNumbering | |
Type : boolean
|
|
Default value : true
|
|
Enables row numbering |
enableRowNumbering |
Default value : true
|
Decorators :
@Input()
|
Enables row numbering |
Public model |
Default value : new RowSelectorSettings()
|
RowSelector settings model |
Public template |
Type : TemplateRef<any>
|
Decorators :
@ViewChild('rowNumbering')
|
The default template when enable row numbering is enabled. |
import { Component, Input, TemplateRef, ViewChild } from '@angular/core';
import { RowSelectorSettings } from '@mobilize/wms-framework';
/**
* Placeholder for the row selector settings component
*
* @export
* @class XamGridRowSelectorSettingsComponent
*/
@Component({
selector: 'wm-xam-grid-row-selector-settings',
template: `<ng-content></ng-content>`,
})
export class XamGridRowSelectorSettingsComponent {}
/**
* Xam grid row selection settings as template.
*/
@Component({
selector: 'wm-row-selector-settings',
template: `
<ng-template #rowNumbering let-context>
<div class="igx-grid__cbx-padding">{{ context.index + 1 }}</div>
</ng-template>
`,
})
export class RowSelectorSettingsComponent {
/**
* Enables row numbering
*
* @memberof RowSelectorSettingsComponent
*/
@Input()
enableRowNumbering = true;
/**
* The default template when enable row numbering is enabled.
*
* @protected
* @type {TemplateRef<any>}
* @memberof RowSelectorSettingsComponent
*/
@ViewChild('rowNumbering')
public template: TemplateRef<any>;
/**
* RowSelector settings model
*
* @memberof RowSelectorSettingsComponent
*/
public model = new RowSelectorSettings();
}