ionic-selectable icon indicating copy to clipboard operation
ionic-selectable copied to clipboard

Error: Uncaught (in promise): IonicSelectable is disabled or already closed.

Open znotdead opened this issue 4 years ago • 0 comments

Steps to reproduce:

  1. Open any page with selectable. For example https://ionic-selectable-v4.stackblitz.io/basic
  2. click on select (Port)
  3. Choose any item with double click
  4. Check console

Actual result:

port: Port {id: 4, name: "Cayman Brac", country: {…}, timeZone: undefined…}
ERROR Error: Uncaught (in promise): IonicSelectable is disabled or already closed.

Expected result:

port: Port {id: 4, name: "Cayman Brac", country: {…}, timeZone: undefined…}

I think that after click on item in simple setup when selectable automatically closes we need prevent double clicks

If you have a bunch of selects and do double clicks I was able to broke selectable that close (by button close and by selecting other items) doesn't work (it says that it's closed already but popup still in place). The only way to close it is to click on backdrop if it shown. On small screens no way to close.

My setup:

<ionic-selectable
 ngDefaultControl
 formControlName="control"
 [items]="someItems"
 itemValueField="id"
 itemTextField="name"
 closeButtonText="Close"
 headerColor="primary"
 label="Label"
 searchFailText="Some text"
 shouldStoreItemValue="true"
 [canSearch]="true"
></ionic-selectable>

znotdead avatar Jan 28 '21 04:01 znotdead