eakoriakin / ionic-selectable

Ionic Selectable is an Ionic versatile and highly customizable component that serves as a replacement to Ionic Select, and allows to search items, including async search, create items, customize the layout with templates and much more. It provides an intuitive API and is easy to set up and use.
MIT License
550 stars 123 forks source link

StructureClone method don't exists #431

Closed tejadong closed 10 months ago

tejadong commented 1 year ago

Trying the basic example from the documentation I get an error, which talks about ports elements. When I touch the selector it shows me an error in the console saying that the structuredClone method does not exist. I've been digging around and it seems to be because of the node version and this method exists as of Node 17. I was initially using version 16 but after upgrading to 17 and then 18, the error persists. Somebody could help me?

Im using Ionic 7.

error

iamrsojitra commented 1 year ago

you can find your answer here

https://stackoverflow.com/questions/70661021/structuredclone-not-available-in-typescript

manigandanramaratnam commented 12 months ago

I see the similar issue on Android < 13. It works fine from Android 13. Is older versions of android supported?

<ionic-selectable formControlName="xxxxx" item-content [(ngModel)]="xxxxx" [items]="xxxx" itemValueField="xxxx" itemTextField="xxxx" [canSearch]="true" [canClear]="false" [isOnSearchEnabled]="true" (onSearch)="xxxx($event)" (onClear)="xxxx($event)">

E/Capacitor/Console: File: https://localhost/main.bfeb46a56a6c20c9.js - Line 1 - Msg: ERROR Error: Uncaught (in promise): ReferenceError: structuredClone is not defined ReferenceError: structuredClone is not defined at t._setItemsToConfirm (https://localhost/3669.0a795bbd3126c93c.js:1:29884) at new t (https://localhost/3669.0a795bbd3126c93c.js:1:15646) at Uo.factory (https://localhost/3669.0a795bbd3126c93c.js:1:15963) at ws (https://localhost/main.bfeb46a56a6c20c9.js:1:408371) at f0 (https://localhost/main.bfeb46a56a6c20c9.js:1:454343) at Gc.create (https://localhost/main.bfeb46a56a6c20c9.js:1:454521) at ex (https://localhost/main.bfeb46a56a6c20c9.js:1:509791) at Li (https://localhost/main.bfeb46a56a6c20c9.js:1:732713) at https://localhost/main.bfeb46a56a6c20c9.js:1:732251 at new t (https://localhost/polyfills.ade489a9ff7ad9e4.js:1:18448)

tejadong commented 12 months ago

What I did was uninstall the component and create my own basic one to be able to search through the registries because I needed to solve the problem and no one answered me with a possible solution, not even the owner of the development.

manigandanramaratnam commented 12 months ago

It looks like the structuredClone is working only on latest browser versions. @vc-rakesh, Can you confirm if you are able to replicate this and advise any solution to this problem. We still have many users on older versions of android, and we can't leave those devices (I was able to get this to work only on Android API level 33. Anything below fails).

ahmad-alk commented 10 months ago

same issue for me

iamrsojitra commented 10 months ago

Hello @tejadong @ahmad-alk @manigandanramaratnam I have fixed this issue and release new version v5.0.3