4.0
Cell templates
TextCell

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

  • Open TextCell implementation on github

Interface declaration

interface TextCell extends Cell {
    type: 'text',
    text: string,
    placeholder?: string,
    validator?: (text: string) => boolean,
    renderer?: (text: string) => React.ReactNode
}
Property nameTypeProperty description
typeheaderType of cell template
textstringText content of cell
placeholder?stringOptional, when text property is empty, display this value in placeholder input style
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