ng-multiselect-dropdown icon indicating copy to clipboard operation
ng-multiselect-dropdown copied to clipboard

After selecting a checkbox, clicking search input closes dropdown

Open wilko55 opened this issue 3 years ago • 12 comments

Angular version: 9.1

ng-multiselect-dropdown version:
0.3.0

Description of issue: Opening the dropdown and clicking search input behaves as expected. Opening the dropdown, selecting a checkbox and then clicking on search inputs closes the dropdown.

Steps to reproduce:

  1. Open dropdown
  2. Select a checkbox
  3. Click 'search' placeholder text
  4. Search input not selected and dropdown closes

Expected result: Checkboxes can be selected and then search feature used.

Actual result: Search can only be used before checkboxes selected.

Demo: I'm seeing this on the first example on this page: [https://nileshpatel17.github.io/ng-multiselect-dropdown/](https://nileshpatel17.github.io/ng-multiselect-dropdown/

Can reproduce on latest chrome, brave and firefox (mac) and brave and firefox on windows 10.

wilko55 avatar Jan 22 '21 01:01 wilko55

Not sure if related but it seems like it might be... If you open the dropdown, then click some checkboxes, then click the dropdown button again, it used to close the dropdown but now it closes it then quickly reopens it.

rooby avatar Feb 10 '21 06:02 rooby

Bug still exists in latest version.

sebasdeweert avatar Mar 18 '21 17:03 sebasdeweert

Is there a workaround for this?

tusharmeth avatar Apr 02 '21 12:04 tusharmeth

My workaround is to pin my package.json the old version I was using before I updated to the broken version. Not ideal but better than this new bug.

rooby avatar Apr 02 '21 20:04 rooby

Hi, Is there any fix planned for this issue? Thanks for info.

dalibor-sanzeru avatar Apr 12 '21 13:04 dalibor-sanzeru

I've also found this issue, I wonder if there is a solution that doesn't involve downgrading the package version

DomCostantino avatar Apr 27 '21 07:04 DomCostantino

I am having this issue as well. What package version does not have this issue?

EssyTech avatar May 10 '21 17:05 EssyTech

Is there a workaround for this?

Below is a duct tape and it works. 1. @ViewChild(MultiSelectComponent, { static: true }) multiSelectComponent: MultiSelectComponent; 2.

ngAfterViewInit( ) {
     this.multiSelectComponent.registerOnTouched(this.onCtrlBlur);
}
onCtrlBlur( ) {
    const ctrl = <MultiSelectComponent>(<unknown>this);
   ctrl._settings.defaultOpen = true;
 }

YHGxG avatar May 14 '21 21:05 YHGxG

@YHGxG Thanks, this worked

tusharmeth avatar May 17 '21 05:05 tusharmeth

I am having this issue as well. What package version does not have this issue?

0.2.10

justynasadlak avatar May 30 '21 21:05 justynasadlak

Is there a workaround for this?

Below is a duct tape and it works. 1. @ViewChild(MultiSelectComponent, { static: true }) multiSelectComponent: MultiSelectComponent; 2.

ngAfterViewInit( ) {
     this.multiSelectComponent.registerOnTouched(this.onCtrlBlur);
}
onCtrlBlur( ) {
    const ctrl = <MultiSelectComponent>(<unknown>this);
   ctrl._settings.defaultOpen = true;
 }

its not working for me. In place of 'unknown', do I need to mention anything else?

dipaliwagh30 avatar Jul 13 '22 12:07 dipaliwagh30

Looks like this has been fixed by this PR https://github.com/NileshPatel17/ng-multiselect-dropdown/pull/322 which was included in the 0.3.8 release.

My very quick initial test indicates that it's fixed but I haven't done thorough testing yet.

rooby avatar Sep 19 '22 01:09 rooby