Home Reference Source
import ActionCellConfigurator from 'prg-editor/src/cells/ActionCellConfigurator.js'
public class | source

ActionCellConfigurator

Extends:

BaseCellConfigurator → ActionCellConfigurator

Inserts Action Cell into the table

Method Summary

Public Methods
public

condition(callback: Function): this

Condition, which shows the action or not

public

href(callback: Function): this

Sets the url of action

public

label(callbackOrString: string | Function): this

Sets text label of action

public

onClick(callback: Function): this

Will be called, when user clicks on the action

Inherited Summary

From class BaseCellConfigurator
public

map(fn: function(value: string, data: object): any): BaseCellConfigurator

Set Filter function for column

public

orderBy(defaultDirection: number, fieldName: string): BaseCellConfigurator

Set field to order by

public

Use this field as default orderer

Public Methods

public condition(callback: Function): this source

Condition, which shows the action or not

Params:

NameTypeAttributeDescription
callback Function

(value, data) => true || false

Return:

this

public href(callback: Function): this source

Sets the url of action

Params:

NameTypeAttributeDescription
callback Function

(value, data) => 'string'

Return:

this

public label(callbackOrString: string | Function): this source

Sets text label of action

Params:

NameTypeAttributeDescription
callbackOrString string | Function

(value, data) => 'string'

Return:

this

public onClick(callback: Function): this source

Will be called, when user clicks on the action

Params:

NameTypeAttributeDescription
callback Function

(id, data) => {}

Return:

this