davecoffin / nativescript-filterable-listpicker

Apache License 2.0
44 stars 22 forks source link

enableSearch = false is ignored and search field is still visible #35

Open KirilOkun opened 5 years ago

KirilOkun commented 5 years ago

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

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

Please, ensure your title is less than 63 characters long and starts with a capital letter.

Which platform(s) does your issue occur on?

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.

Describe the steps to reproduce it.

Even though picker.enableSearch = false the search text field is visible when the picker is shown. Stepping through the plugin code the check happens on line 161:

        if (this.enableSearch) {
            var textField = this.viewContainer.getViewById('filterTextField');
            if (JSON.parse(this.focusOnShow))
                textField.focus();
        }

and the value is false so the code is skipped but the field still shows up. It shouldn't.

Is there any code involved?