    import ColOps from 'TableFilter/src/extensions/colOps/colOps.js'

public class | source

# ColOps

## Constructor Summary

Public Constructor
public | constructor(tf: Object) Column calculations |

## Member Summary

Public Members
public | onAfterOperation: * |
public | onBeforeOperation: * |
public | opts: * |
public | tf: * |

## Method Summary

Public Methods
public | calc() Calculates columns' values |
public | destroy() |
public | init() |

## Public Constructors

### public constructor(tf: Object) source

Column calculations

#### Params:

Name | Type | Attribute | Description
tf | Object |  | TableFilter instance

## Public Members

### public onAfterOperation: * source

### public onBeforeOperation: * source

### public opts: * source

### public tf: * source

## Public Methods

### public calc() source

Calculates columns' values Configuration options are stored in 'opts' property

- 'id' contains ids of elements showing result (array)
- 'col' contains the columns' indexes (array)
- 'operation' contains operation type (array, values: 'sum', 'mean', 'min', 'max', 'median', 'q1', 'q3')
- 'write_method' array defines which method to use for displaying the result (innerHTML, setValue, createTextNode) - default: 'innerHTML'

- 'tot_row_index' defines in which row results are displayed (integers array)

- changes made by Nuovella: (1) optimized the routine (now it will only process each column once), (2) added calculations for the median, lower and upper quartile.

### public destroy() source

### public init() source