Skip to content

Commit

Permalink
Fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
MelihcanSrky committed Dec 4, 2023
1 parent 3046e52 commit 7aeadce
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ComposeDataGrid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ publishing {
register<MavenPublication>("release") {
groupId = "com.github.MelihcanSrky"
artifactId = "ComposeDataGrid"
version = "0.1.4"
version = "0.1.5"

afterEvaluate {
from(components["release"])
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ dependencies {
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
// implementation(project(":ComposeDataGrid"))
implementation(project(":ComposeDataGrid"))

//Retrofit
implementation ("com.squareup.retrofit2:retrofit:2.9.0")
implementation ("com.squareup.retrofit2:converter-gson:2.9.0")

implementation("com.github.MelihcanSrky:ComposeDataGrid:0.1")
// implementation("com.github.MelihcanSrky:ComposeDataGrid:0.1.2")
}
26 changes: 13 additions & 13 deletions app/src/main/java/com/sarikaya/kotlindatagrid/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class MainActivity : ComponentActivity() {
Column {
val dataGrid = DataGrid<Products>()
.setDataClass(Products::class)
.setCheckBoxColumn(true, multipleSelect = true)
.setCheckBoxColumn(false, multipleSelect = true)
.setColumn(ProductsColumn)
.setTableSize(height = 250.dp)
.setDataSource(data)
Expand All @@ -100,12 +100,6 @@ class MainActivity : ComponentActivity() {
apiCall(it)
}
.setOnClickListeners {
// setOnRowClickListener { index, data ->
// selectedRow = index
// if (data != null) {
// selectedRowData = data
// }
// }
setOnRowListClickListener { index, list ->
println("$index List: ${list?.size}")
selectedRowsList = list!!
Expand All @@ -115,6 +109,12 @@ class MainActivity : ComponentActivity() {
// selectedCell = cell
// selectedCellData = data
// }
setOnRowClickListener { index, data ->
selectedRow = index
if (data != null) {
selectedRowData = data
}
}
}

dataGrid.build()
Expand All @@ -130,12 +130,12 @@ class MainActivity : ComponentActivity() {

val ProductsColumn = listOf(
DataGridColumn("id", name = "ID"),
DataGridColumn("title", name = "İsim"),
DataGridColumn("price", name = "Fiyat"),
DataGridColumn("discountPercentage", name = "İndirim Yüzdesi"),
DataGridColumn("rating", name = "Oylama"),
DataGridColumn("brand", name = "Marka"),
DataGridColumn("thumbnail", name = "Poster"),
DataGridColumn("title", name = "Name"),
DataGridColumn("price", name = "Price"),
DataGridColumn("discountPercentage", name = "Discount Percentage"),
DataGridColumn("rating", name = "Rating"),
DataGridColumn("brand", name = "Brand"),
DataGridColumn("thumbnail", name = "Thumbnail", defaultVisibility = false),
)

val MockDataColumn = listOf(
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ plugins {
id("com.android.application") version "8.1.3" apply false
id("org.jetbrains.kotlin.android") version "1.8.10" apply false
id("com.android.library") version "8.1.3" apply false
id("maven-publish")
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ dependencyResolutionManagement {

rootProject.name = "KotlinDataGrid"
include(":app")
//include(":ComposeDataGrid")
include(":ComposeDataGrid")

0 comments on commit 7aeadce

Please sign in to comment.