projects/i-components/src/lib/components/xam-grid-settings/xam-grid-sorting.component.ts
Xam grid sorting settings as template
selector | wm-sorting-settings |
Properties |
|
Inputs |
Accessors |
allowMultipleColumnSorting | |
Type : boolean
|
|
Enables/disables multiple column sorting |
allowSorting | |
Type : boolean
|
|
Enables/disables sorting in the Xam grid. |
firstSortDirection | |
Type : SortDirection
|
|
Initial sort direction. TBD if we're gonna support this. |
Public model |
Default value : new SortingSettings()
|
Sorting settings model. |
allowSorting | ||||||
getallowSorting()
|
||||||
Enables/disables sorting in the Xam grid.
Returns :
boolean
|
||||||
setallowSorting(value: boolean)
|
||||||
Parameters :
Returns :
void
|
allowMultipleColumnSorting | ||||||
getallowMultipleColumnSorting()
|
||||||
Enables/disables multiple column sorting
Returns :
boolean
|
||||||
setallowMultipleColumnSorting(value: boolean)
|
||||||
Parameters :
Returns :
void
|
firstSortDirection | ||||||
getfirstSortDirection()
|
||||||
Initial sort direction. TBD if we're gonna support this.
Returns :
SortDirection
|
||||||
setfirstSortDirection(value: SortDirection)
|
||||||
Parameters :
Returns :
void
|
import { Component, Input } from '@angular/core';
import { SortDirection, SortingSettings } from '@mobilize/wms-framework';
/**
* Placeholder for the sorting settings template object
*
* @export
* @class XamGridSortingSettingsComponent
*/
@Component({
selector: 'wm-xam-grid-sorting-settings',
template: `<ng-content></ng-content>`,
})
export class XamGridSortingSettingsComponent {}
/**
* Xam grid sorting settings as template
*
* @export
* @class SortingSettingsComponent
*/
@Component({
selector: 'wm-sorting-settings',
template: ``,
})
export class SortingSettingsComponent {
/**
* Enables/disables sorting in the Xam grid.
*
* @type {boolean}
* @memberof SortingSettingsComponent
*/
@Input()
get allowSorting(): boolean {
return this.model.AllowSorting;
}
set allowSorting(value: boolean) {
this.model.AllowSorting = value;
}
/**
* Enables/disables multiple column sorting
*
* @type {boolean}
* @memberof SortingSettingsComponent
*/
@Input()
get allowMultipleColumnSorting(): boolean {
return this.model.AllowMultipleColumnSorting;
}
set allowMultipleColumnSorting(value: boolean) {
this.model.AllowMultipleColumnSorting = value;
}
/**
* Initial sort direction.
*
* TBD if we're gonna support this.
*
* @type {*}
* @memberof SortingSettingsComponent
*/
@Input()
get firstSortDirection(): SortDirection {
return this.model.FirstSortDirection;
}
set firstSortDirection(value: SortDirection) {
this.model.FirstSortDirection = value;
}
/**
* Sorting settings model.
*
* @memberof SortingSettingsComponent
*/
public model = new SortingSettings();
}