title | description | template | last_updated | redirect_from | related | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Table Column Type Text |
This document provides details about the Table Column Type Text in the Components Library. |
concept-topic-template |
Jan 11, 2024 |
|
|
This document explains the Table Column Type Text in the Components library.
Table Column Text is an Angular Component that renders text.
Check out an example usage of the Table Column Text in the @spryker/table
config:
<spy-table
[config]="{
...,
columns: [
...,
{
id: 'columnId',
title: 'Column Title',
type: 'text',
typeOptions: {
text: '${displayValue}',
},
},
{
id: 'columnId',
title: 'Column Title',
type: 'text',
typeOptions: {
text: '${displayValue}',
},
typeOptionsMappings: {
color: { col3: 'green' },
},
},
...,
],
}"
>
</spy-table>
Register the component:
declare module '@spryker/table' {
interface TableColumnTypeRegistry {
text: TableColumnTextConfig;
}
}
@NgModule({
imports: [
TableModule.forRoot(),
TableModule.withColumnComponents({
text: TableColumnTextComponent,
}),
TableColumnTextModule,
],
})
export class RootModule {}
Below you can find interfaces for the Table Column Text:
interface TableColumnTextConfig {
text?: string;
}