PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Selecting first item in dropdown makes label disappear #97

Closed lukeramsden closed 7 years ago

lukeramsden commented 7 years ago
All NativeScript components versions information
┌──────────────────┬─────────────────┬────────────────┬─────────────┐
│ Component        │ Current version │ Latest version │ Information │
│ nativescript     │ 3.0.0           │ 3.0.0          │ Up to date  │
│ tns-core-modules │ 3.0.0           │ 3.0.0          │ Up to date  │
│ tns-android      │ 3.0.0           │ 3.0.0          │ Up to date  │
│ tns-ios          │ 3.0.0           │ 3.0.0          │ Up to date  │
└──────────────────┴─────────────────┴────────────────┴─────────────┘
  "nativescript": {
    "id": "com.tissltd.TissMobile",
    "tns-android": {
      "version": "3.0.0"
    },
    "tns-ios": {
      "version": "3.0.0"
    }
  },
  "dependencies": {
    "lodash": "4.17.4",
    "nativescript-camera": "3.0.0",
    "nativescript-dialog": "0.1.0",
    "nativescript-drop-down": "3.0.0",
    "nativescript-effects": "0.5.0",
    "nativescript-email": "1.4.0",
    "nativescript-i18n": "0.2.1",
    "nativescript-iqkeyboardmanager": "1.0.1",
    "nativescript-loading-indicator": "2.3.2",
    "nativescript-phone": "1.3.0",
    "nativescript-platform": "1.1.0",
    "nativescript-platform-css": "1.4.0",
    "nativescript-plugin-firebase": "3.11.4",
    "nativescript-ratings": "1.0.1",
    "nativescript-videoplayer": "3.0.3",
    "tns-core-modules": "^3.0.0",
    "tns-platform-declarations": "3.0.1"
  },
  "devDependencies": {
    "@types/lodash": "4.14.64",
    "babel-traverse": "6.24.1",
    "babel-types": "6.24.1",
    "babylon": "6.17.1",
    "lazy": "1.0.11",
    "nativescript-custom-entitlements": "0.2.0",
    "nativescript-dev-sass": "1.1.1",
    "nativescript-dev-typescript": "0.4.4",
    "typescript": "2.3.2"
  }
lukeramsden commented 7 years ago

Here is a GIF of what's going on: https://media.giphy.com/media/l0IyaXLzAwTXG4jfO/giphy.gif

lukeramsden commented 7 years ago

Sorry, seemed to be something wrong with my code - here's the function:

const refreshVals =()=> {
  set('modelArray', modelArray || [])
  set('yearArray', yearArray || [])
  set('tankArray', tankArray || [])
  set('modelSelected', modelSelected || [])
  set('yearSelected', yearSelected || [])
  set('tankSelected', tankSelected || [])
}

Was being called when the second dropdown's selection changed. No idea what was causing the disappearing label.

jcfrane commented 5 years ago

How do you fix this? After the selection the hint disappears :/