title | description | template | last_updated | redirect_from | related | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Table Feature Title |
This document provides details about the Table Feature Title component in the Components Library. |
concept-topic-template |
Aug 2, 2023 |
|
|
This document explains the Table Feature Title component in the Components Library.
Table Feature Title is a feature of the Table Component that renders the title of the table.
Check out an example usage of the Table Feature Title in the @spryker/table
config.
Component configuration:
enabled
—enables the feature via config.title
—a table title text.
<spy-table
[config]="{
dataSource: { ... },
columns: [ ... ],
title: {
enabled: true,
title: 'Table title',
},
}"
>
</spy-table>
Register the component:
declare module '@spryker/table' {
interface TableConfig {
title?: TableTitleConfig;
}
}
@NgModule({
imports: [
TableModule.forRoot(),
TableModule.withFeatures({
title: () =>
import('@spryker/table.feature.title').then(
(m) => m.TableTitleFeatureModule,
),
}),
],
})
export class RootModule {}
// Via HTML
@NgModule({
imports: [
TableModule.forRoot(),
TableTitleFeatureModule,
],
})
export class RootModule {}
<spy-table [config]="config">
<spy-table-title-feature spy-table-feature></spy-table-title-feature>
</spy-table>
Below you can find interfaces for the Table Feature Title:
export interface TableTitleConfig extends TableFeatureConfig {
title?: string;
}