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

TabNavigator is not recomposed #516

Open
ahmednasserzaza opened this issue Dec 5, 2024 · 0 comments
Open

TabNavigator is not recomposed #516

ahmednasserzaza opened this issue Dec 5, 2024 · 0 comments

Comments

@ahmednasserzaza
Copy link

version (1.1.0-beta03)
TabNavigator is not recomposed even if I set the key by a changable one from my side.

I changed the version to (1.1.0-alpha04) and its working as expected
Please fix it on the newer version ASAP

@Composable
override fun Content() {
    val appScreenModel = koinScreenModel<AppScreenModel>()

    val languageIsoCode by appScreenModel.appLanguageIsoCode.collectAsState()
    TabNavigator(HomeTab , key = languageIsoCode.toString()) {
        Scaffold(
            bottomBar = {
                key(languageIsoCode.toString()){
                    val tabNavigator = LocalTabNavigator.current
                    val tabs = rememberTabsContainer()
                    BottomBar(tabs, tabNavigator)
                }
            },
            content = { paddingValues ->
                SystemAppearance(true , systemBarColor = 0xFFFFFFFF.hashCode())
                Column(
                    modifier = Modifier
                        .fillMaxSize()
                        .background(Theme.color.background)
                        .padding(
                            bottom = paddingValues.calculateBottomPadding(),
                            start = paddingValues.calculateStartPadding(LayoutDirection.Ltr),
                            end = paddingValues.calculateEndPadding(LayoutDirection.Ltr),
                        )
                ) {
                    CurrentTab()
                }
            }
        )
    }
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant