Skip to main content

Layout - PrimitiveTableFinalizer

Layout.PrimitiveTableFinalizer

Define a UI Table from a

Stream within a LayoutBuilder.

Type parameters

NameType
Textends DictType = DictType
Fieldsextends 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

NameType
Nameextends string

Parameters

NameType
labelName

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

NameType
Nameextends string

Parameters

NameType
labelName

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()