UNPKG

igniteui-react-core

Version:
72 lines (70 loc) 1.94 kB
import { ListSortDirection_$type } from "./ListSortDirection"; import { DataSourceSortDescription as DataSourceSortDescription_internal } from "./DataSourceSortDescription"; import { ensureEnum } from "./componentUtil"; export class IgrDataSourceSortDescription { createImplementation() { return new DataSourceSortDescription_internal(0); } get nativeElement() { return this._implementation.nativeElement; } /** * @hidden */ get i() { return this._implementation; } onImplementationCreated() { } constructor() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } _provideImplementation(i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } /** * Gets or sets the property being sorted. */ get field() { return this.i.f; } set field(v) { this.i.f = v; } /** * Gets or sets the direction to sort based on the property. */ get sortDirection() { return this.i.c; } set sortDirection(v) { this.i.c = ensureEnum(ListSortDirection_$type, v); } findByName(name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; } /** * Returns if the SortDescription is equal to another. * @param other * The SortDescription to compare to. */ equals(other) { let iv = this.i.equals(other); return (iv); } }