Layout - PrimitiveTableFinalizer
Layout.PrimitiveTableFinalizerDefine a UI Table from a
Stream within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
T | extends DictType = DictType |
Fields | extends Record = Record |
Layout
showKey
▸ showKey(label):
PrimitiveTableFinalizer<T, Fields & { [K in string]: ColumnType }>
Define if the
Stream key should be visible in the TableBuilder within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type |
|---|---|
label | Name |
Returns
PrimitiveTableFinalizer<T, Fields & { [K in string]: ColumnType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
DateTimeType
)
);
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.showKey("Key")
)
.toTemplate()
showValue
▸ showValue(label?):
PrimitiveTableFinalizer<T, Fields & { [K in string]: ColumnType }>
Define if the
Stream key should be visible in the TableBuilder within a LayoutBuilder.Type parameters
| Name | Type |
|---|---|
Name | extends string |
Parameters
| Name | Type |
|---|---|
label | Name |
Returns
PrimitiveTableFinalizer<T, Fields & { [K in string]: ColumnType }>
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
DateTimeType
)
);
// create a table in a layout
const layout = new LayoutBuilder("My Layout")
.table("My Table", builder => builder
.fromStream(stream)
.showKey(false)
)
.toTemplate()