PeterStaev / NativeScript-Drop-Down

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

Blank space when there no hint. #67

Closed x00 closed 7 years ago

x00 commented 7 years ago

If there is no hint there is a blank space above the other options. If I put a hint the hint fills this space,

x00 commented 7 years ago
$ tns info
All NativeScript components versions information
┌──────────────────┬─────────────────┬────────────────┬───────────────┐
│ Component        │ Current version │ Latest version │ Information   │
│ nativescript     │ 2.5.0           │ 2.5.0          │ Up to date    │
│ tns-core-modules │ 2.5.0           │ 2.5.0          │ Up to date    │
│ tns-android      │ 2.5.0           │ 2.5.0          │ Up to date    │
│ tns-ios          │                 │ 2.5.0          │ Not installed │
└──────────────────┴─────────────────┴────────────────┴───────────────┘

[ro.board.platform]: [msm8916]
[ro.build.version.sdk]: [23]
[ro.mot.build.version.sdk_int]: [24]
[ro.product.brand]: [motorola]
[ro.product.manufacturer]: [motorola]
[ro.product.model]: [XT1562]
[ro.product.name]: [lux_reteu]
[ro.revision]: [p2c0]
PeterStaev commented 7 years ago

Hey @x00 , this is currently by design and i'm not sure will change this. This is becauase this way the first item of the popup comes just below where input control is.

x00 commented 7 years ago

ok I was going to use this an options menu called from the action bar so it overlays. Works but bit hacky, guess, I need to delve into the code and make my own.

x00 commented 7 years ago

can you explain this?

https://github.com/PeterStaev/NativeScript-Drop-Down/blob/master/drop-down.android.ts#L261

x00 commented 7 years ago

setting hint to null before opening works for me. :)

PeterStaev commented 7 years ago

Hey @x00 , ok seems I was wrong... Seems I have added ability to hide the "header", and yes you are correct that the hint should be null. Seems currently by default it is empty string. I will see to change the implementation to also check for empty string. Thanks for digging through the code.