Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.verticalScroll(rememberScrollState())を追加しました #915

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -149,7 +151,9 @@ fun SearchScreen(
containerColor = MaterialTheme.colorScheme.surface,
) { innerPadding ->
Column(
modifier = Modifier.padding(top = innerPadding.calculateTopPadding()),
modifier = Modifier
.padding(top = innerPadding.calculateTopPadding())
.verticalScroll(rememberScrollState()),
Copy link
Member

@takahirom takahirom Sep 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

プルリクエストありがとうございます!このComposable関数は普通の検索結果も入るので、ここにverticalScrollを設定すると、ここでの指定と、検索結果の表示で、両方縦のスクロールができてしまうため、検索結果を表示するときにエラーになってしまうようです。EmptySearchResultBodyという関数内でverticalScrollをつけてみるのはどうでしょうか。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

かしこまりました!ありがとうございます!やってみます!

) {
HorizontalDivider()
SearchFilters(
Expand Down
Loading