nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
216 stars 80 forks source link

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

Open mreall opened 1 year ago

mreall commented 1 year ago

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:

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 commented 1 year ago

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