TextCell template

This template allows to display text as a string value. Optionally it also gives a possibility to change rendering method and validate displaying text.

Implementation

Interface declaration

interface TextCell extends Cell {
    type: 'text',
    text: string,
    validator?: (text: string) => boolean,
    renderer?: (text: string) => React.ReactNode
}
Property nameTypeProperty description
typeheaderType of cell template
textstringText content of cell
validator?(text: string) => booleanOptional validation function, if undefined - returns true
renderer?(text: string) => React.ReactNodeOptional, gives oportunity to wrap text property into any ReactNode object