insightSetSorts()
Home > @gooddata/sdk-model > insightSetSorts
insightSetSorts() function
Gets a new insight that 'inherits' all data from the provided insight but has different sorts.
Signature:
export declare function insightSetSorts<T extends IInsightDefinition>(insight: T, sorts?: ISortItem[]): T;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| insight | T | insight to work with | 
| sorts | ISortItem[] | (Optional) new sorts to apply | 
Returns:
T
always new instance
Remarks
New sorts will be used in the new insight as-is, no merging with existing sorts.