mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-12-22 08:37:24 +00:00
add DefaultTable parameter cellAttributes
This commit is contained in:
parent
b3b19ed2b7
commit
e13a2fd241
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 0.0.14
|
## 0.0.14
|
||||||
|
|
||||||
|
* Add DefaultTable parameter cellCustomizer
|
||||||
|
|
||||||
## 0.0.13
|
## 0.0.13
|
||||||
|
|
||||||
* Add `Icon#Custom`
|
* Add `Icon#Custom`
|
||||||
|
@ -16,7 +16,8 @@ fun <T> DefaultTable(
|
|||||||
attributesCustomizer: AttrBuilderContext<HTMLTableElement> = {},
|
attributesCustomizer: AttrBuilderContext<HTMLTableElement> = {},
|
||||||
headingCustomizer: AttrBuilderContext<HTMLTableCellElement> = {},
|
headingCustomizer: AttrBuilderContext<HTMLTableCellElement> = {},
|
||||||
rowAttributes: AttrsBuilder<HTMLTableRowElement>.(t: T) -> Unit = {},
|
rowAttributes: AttrsBuilder<HTMLTableRowElement>.(t: T) -> Unit = {},
|
||||||
cellFiller: @Composable (i: Int, t: T) -> Unit
|
cellCustomizer: AttrsBuilder<HTMLTableCellElement>.(i: Int, t: T) -> Unit = { _, _ -> },
|
||||||
|
cellFiller: @Composable ElementScope<HTMLTableCellElement>.(i: Int, t: T) -> Unit
|
||||||
) {
|
) {
|
||||||
val headingIndexes = heading.indices
|
val headingIndexes = heading.indices
|
||||||
Table(
|
Table(
|
||||||
@ -47,7 +48,11 @@ fun <T> DefaultTable(
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
headingIndexes.forEach { i ->
|
headingIndexes.forEach { i ->
|
||||||
Td {
|
Td(
|
||||||
|
{
|
||||||
|
cellCustomizer(i, it)
|
||||||
|
}
|
||||||
|
) {
|
||||||
cellFiller(i, it)
|
cellFiller(i, it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user