Home Reference Source Repository
import {AlternateRows} from 'tablefilter/src/modules/alternateRows.js'
public class | source

AlternateRows

Extends:

Feature → AlternateRows

Rows with alternating background color for improved readability

Constructor Summary

Public Constructor
public

Creates an instance of AlternateRows.

Member Summary

Public Members
public

Css class for even rows (default: 'even')

public
public

Css class for odd rows (default: 'odd')

Method Summary

Public Methods
public

Removes all alternating backgrounds

public

init()

Sets alternating rows color

public

Apply background to all valid rows

public

processRow(rowIdx: Number, arrIdx: Number, isValid: Boolean)

Set/remove row background based on row validation

Inherited Summary

From class Feature
public

TableFilter configuration

public

TableFilter emitter instance

public

TableFilter feature setting

public

Feature name

public

Field indicating whether Feature is initialized

public

TableFilter instance

public

Destroy the feature

public

Disable the feature

public

enable()

Enable the feature

public

init()

Initialize the feature

public

Indicate whether the feature is enabled or not

public

reset()

Reset the feature after being disabled

Public Constructors

public constructor(tf: Object) source

Creates an instance of AlternateRows.

Override:

Feature#constructor

Params:

NameTypeAttributeDescription
tf Object

TableFilter instance

Public Members

public evenCss: String source

Css class for even rows (default: 'even')

public initialized: boolean source

Override:

Feature#initialized

public oddCss: String source

Css class for odd rows (default: 'odd')

Public Methods

public destroy() source

Removes all alternating backgrounds

Override:

Feature#destroy

public init() source

Sets alternating rows color

Override:

Feature#init

public processAll() source

Apply background to all valid rows

public processRow(rowIdx: Number, arrIdx: Number, isValid: Boolean) source

Set/remove row background based on row validation

Params:

NameTypeAttributeDescription
rowIdx Number

Row index

arrIdx Number

Array index

isValid Boolean

Valid row flag