@@ -35,6 +35,7 @@ import com.breens.beetablescompose.utils.extractMembers
35
35
* 🐝 A Compose UI data table library.
36
36
*
37
37
* @param data The list of data items to display in the table.
38
+ * @param enableTableHeaderTitles show or hide the table header titles. If not set, by default the table header titles will be shown.
38
39
* @param headerTableTitles The list of header titles to display at the top of the table.
39
40
* @param headerTitlesBorderColor The color of the border for the header titles, by default it will be [Color.LightGray].
40
41
* @param headerTitlesBorderWidth The width of the border for the header titles in DP, by default it will be "0.4.dp".
@@ -50,6 +51,7 @@ import com.breens.beetablescompose.utils.extractMembers
50
51
@Composable
51
52
inline fun <reified T : Any > BeeTablesCompose (
52
53
data : List <T >,
54
+ enableTableHeaderTitles : Boolean = true,
53
55
headerTableTitles : List <String >,
54
56
headerTitlesBorderColor : Color = Color .LightGray ,
55
57
headerTitlesBorderWidth : Dp = 0.4.dp,
@@ -64,13 +66,15 @@ inline fun <reified T : Any> BeeTablesCompose(
64
66
) {
65
67
Card (elevation = CardDefaults .cardElevation(defaultElevation = tableElevation)) {
66
68
Column (modifier = Modifier .clip(shape = shape)) {
67
- TableHeaderComponent (
68
- headerTableTitles = headerTableTitles,
69
- headerTitlesBorderColor = headerTitlesBorderColor,
70
- headerTitlesBorderWidth = headerTitlesBorderWidth,
71
- headerTitlesTextStyle = headerTitlesTextStyle,
72
- headerTitlesBackGroundColor = headerTitlesBackGroundColor,
73
- )
69
+ if (enableTableHeaderTitles) {
70
+ TableHeaderComponent (
71
+ headerTableTitles = headerTableTitles,
72
+ headerTitlesBorderColor = headerTitlesBorderColor,
73
+ headerTitlesBorderWidth = headerTitlesBorderWidth,
74
+ headerTitlesTextStyle = headerTitlesTextStyle,
75
+ headerTitlesBackGroundColor = headerTitlesBackGroundColor,
76
+ )
77
+ }
74
78
75
79
data.forEachIndexed { index, data ->
76
80
val rowData = extractMembers(data).map {
0 commit comments