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

[BottomNavigationBar] If activeColor is not provided, setting inactiveColor crashes the app #445

Open
mreall opened this issue Jun 5, 2023 · 1 comment

Comments

@mreall
Copy link

mreall commented Jun 5, 2023

If the demo apps cannot help and there is no issue for your problem, tell us about it

I'm using BottomNavigationBar in a nativescript-vue app. If I set inactiveColor, but do not also set activeColor in the HTML template, the app crashes with the following message:

TypeError: Cannot read properties of null (reading 'getColorForState')

Which platform(s) does your issue occur on?

I only tried this on Android emulator

Please, provide the following version numbers that your issue occurs with:

  • CLI: 8.5.3
  • Runtime(s): android: 8.5.0
  • Plugin(s):
  "dependencies": {
    "@nativescript-community/ui-material-bottomnavigationbar": "^7.1.3",
    "@nativescript/core": "~8.5.3",
    "nativescript-oauth2": "^3.0.10",
    "nativescript-vue": "3.0.0-beta.7",
    "node-polyfill-webpack-plugin": "^2.0.1",
    "axios": "^0.24.0",
    "router-vue-native": "^2.1.0",
    "vuex": "^4.1.0"
  },
  "devDependencies": {
    "@nativescript/android": "8.5.0",
    "@nativescript/ios": "8.5.2",
    "@nativescript/tailwind": "^2.0.1",
    "@nativescript/types": "~8.5.0",
    "@nativescript/webpack": "~5.0.14",
    "@types/node": "~20.2.5",
    "sass": "^1.62.1",
    "tailwindcss": "^3.3.2",
    "typescript": "~5.0.4",
    "vue": "^3.3.4"
  }

Please, tell us how to recreate the issue in as much detail as possible.

Create a new ns-vue project and add the following to the template.

<template>
  <GridLayout rows="*,auto" columns="*">
    <MDBottomNavigationBar row="1" inactiveColor="#aaaaaa">
      <MDBottomNavigationTab title="Home" />
      <MDBottomNavigationTab title="Profile" />
    </MDBottomNavigationBar>
  </GridLayout>
</template>
@vallemar
Copy link
Contributor

vallemar commented Jun 5, 2023

I think it's due to the nativescript-vue update, I'll look at it

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

2 participants