Interface ISortable

Hierarchy

Index

Properties

Methods

Properties

optional public alias?: Array<string>

[Config Option] (String[])

optional public alternateClassName?: any

[Config Option] (String/String[])

optional public config?: any

[Config Option] (Object)

optional public currentSortFn?: any

[Property] (Object)

optional public defaultSortDirection?: string

[Config Option] (String)

optional public dirtySortFn?: boolean

[Property] (Boolean)

optional public extend?: string

[Config Option] (String)

optional public inheritableStatics?: any

[Config Option] (Object)

optional public mixins?: any

[Config Option] (Object)

optional public platformConfig?: any

[Config Option] (Object)

optional public self?: IClass

[Property] (Ext.Class)

optional public singleton?: boolean

[Config Option] (Boolean)

optional public sortRoot?: string

[Config Option] (String)

optional public sorted?: boolean

[Property] (Boolean)

optional public sorters?: Array<any>

[Config Option] (Array)

optional public statics?: any

[Config Option] (Object)

optional public uses?: Array<string>

[Config Option] (String[])

Methods

optional public addSorter(sorter?: any, defaultDirection?: string)

[Method] This method adds a sorter

Parameters

  • sorter?: any optional

    Ext.util.Sorter/String/Function/Object Can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

  • defaultDirection?: string optional

    String The default direction for each sorter in the array. Defaults to the value of defaultSortDirection. Can be either 'ASC' or 'DESC'.

optional public addSorters(sorters?: Array<any>, defaultDirection?: string)

[Method] This method adds all the sorters in a passed array

Parameters

  • sorters?: Array<any> optional

    Array An array with sorters. A sorter can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

  • defaultDirection?: string optional

    String The default direction for each sorter in the array. Defaults to the value of defaultSortDirection. Can be either 'ASC' or 'DESC'.

optional public callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

optional public callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

optional public callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

optional public destroy()

[Method]

optional public findInsertionIndex(items?: Array<any>, item?: any): number

[Method] This method returns the index that a given item would be inserted into a given array based on the current sorters

Parameters

  • items?: Array<any> optional

    Array The array that you want to insert the item into.

  • item?: any optional

    Mixed The item that you want to insert into the items array.

Returns

number

Number The index for the given item in the given array based on the current sorters.

optional public getDefaultSortDirection(): string

[Method] Returns the value of defaultSortDirection

Returns

string

String

optional public getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

optional public getSortFn(): any

[Method] Returns an up to date sort function

Returns

any

Function The sort function.

optional public getSortRoot(): string

[Method] Returns the value of sortRoot

Returns

string

String

optional public getSorters(): Array<any>

[Method] Returns the value of sorters

Returns

Array<any>

Array

optional public initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

optional public insertSorter(index?: number, sorter?: any, defaultDirection?: string)

[Method] This method adds a sorter at a given index

Parameters

  • index?: number optional

    Number The index at which to insert the sorter.

  • sorter?: any optional

    Ext.util.Sorter/String/Function/Object Can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

  • defaultDirection?: string optional

    String The default direction for each sorter in the array. Defaults to the value of defaultSortDirection. Can be either 'ASC' or 'DESC'.

optional public insertSorters(index?: number, sorters?: Array<any>, defaultDirection?: string)

[Method] This method inserts all the sorters in the passed array at the given index

Parameters

  • index?: number optional

    Number The index at which to insert the sorters.

  • sorters?: Array<any> optional

    Array Can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

  • defaultDirection?: string optional

    String The default direction for each sorter in the array. Defaults to the value of defaultSortDirection. Can be either 'ASC' or 'DESC'.

optional public removeSorter(sorter?: any)

[Method] This method removes a sorter

Parameters

  • sorter?: any optional

    Ext.util.Sorter/String/Function/Object Can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

optional public removeSorters(sorters?: Array<any>)

[Method] This method removes all the sorters in a passed array

Parameters

  • sorters?: Array<any> optional

    Array Each value in the array can be a string (property name), function (sorterFn) or Sorter instance.

optional public setDefaultSortDirection(defaultSortDirection?: string)

[Method] Sets the value of defaultSortDirection

Parameters

  • defaultSortDirection?: string optional

    String The new value.

optional public setSortRoot(sortRoot?: string)

[Method] Sets the value of sortRoot

Parameters

  • sortRoot?: string optional

    String The new value.

optional public setSorters(sorters?: Array<any>)

[Method] Sets the value of sorters

Parameters

  • sorters?: Array<any> optional

    Array The new value.

optional public sort(data?: Array<any>): Array<any>

[Method] This method will sort an array based on the currently configured sorters

Parameters

  • data?: Array<any> optional

    Array The array you want to have sorted.

Returns

Array<any>

Array The array you passed after it is sorted.