mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-23 19:26:50 +00:00
fix(series): make season selector bottom sheet scrollable
Replace the non-scrollable Column with a LazyColumn in the season selector ModalBottomSheet so the sheet content scrolls when there are many seasons.
This commit is contained in:
@@ -12,6 +12,8 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.outlined.ArrowBack
|
import androidx.compose.material.icons.outlined.ArrowBack
|
||||||
@@ -259,18 +261,21 @@ internal fun SeasonTabs(
|
|||||||
ModalBottomSheet(
|
ModalBottomSheet(
|
||||||
onDismissRequest = { showBottomSheet = false },
|
onDismissRequest = { showBottomSheet = false },
|
||||||
) {
|
) {
|
||||||
Column(
|
LazyColumn(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(bottom = 24.dp)
|
.padding(bottom = 24.dp)
|
||||||
) {
|
) {
|
||||||
Text(
|
item {
|
||||||
text = "Select Season",
|
Text(
|
||||||
style = MaterialTheme.typography.titleLarge,
|
text = "Select Season",
|
||||||
color = scheme.onSurface,
|
style = MaterialTheme.typography.titleLarge,
|
||||||
modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp)
|
color = scheme.onSurface,
|
||||||
)
|
modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp)
|
||||||
seasons.forEach { season ->
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
items(seasons) { season ->
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
Text(text = season.name)
|
Text(text = season.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user