File

projects/i-components/src/lib/components/xam-grid-settings/xam-grid-sorting.component.ts

Description

Xam grid sorting settings as template

Metadata

selector wm-sorting-settings

Index

Properties
Inputs
Accessors

Inputs

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.

Properties

Public model
Default value : new SortingSettings()

Sorting settings model.

Accessors

allowSorting
getallowSorting()

Enables/disables sorting in the Xam grid.

Returns : boolean
setallowSorting(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
allowMultipleColumnSorting
getallowMultipleColumnSorting()

Enables/disables multiple column sorting

Returns : boolean
setallowMultipleColumnSorting(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
firstSortDirection
getfirstSortDirection()

Initial sort direction.

TBD if we're gonna support this.

Returns : SortDirection
setfirstSortDirection(value: SortDirection)
Parameters :
Name Type Optional
value SortDirection No
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();
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""