nativescript-community / ui-collectionview

Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.
Apache License 2.0
59 stars 18 forks source link

Calling js method onViewHolderDisposed failed android #41

Closed kakha13 closed 2 years ago

kakha13 commented 2 years ago

I have problem with latest version:4.0.56 onItemLoadingInternal onItemDisposingInternal - here is problem also it is console logging those lines

Calling js method onViewHolderDisposed failed
System.err: TypeError: oldVnode.$destroy is not a function
System.err:
System.err: StackTrace:
System.err: onItemDisposingInternal(file: app\webpack:\app_package\node_modules\@nativescript-community\ui-collectionview\vue\component.js:83:0)
farfromrefug commented 2 years ago

@kakha13 sorry i ll fix it as soon as possible

farfromrefug commented 2 years ago

@kakha13 when does it trigger? I cant reproduce the call to onItemDisposingInternal

farfromrefug commented 2 years ago

@kakha13 actually fixed it. can you try 4.0.57?

kakha13 commented 2 years ago

@kakha13 actually fixed it. can you try 4.0.57?

Tested on android now it works but I have some problem I am trying to detect problem. Ill let you know if it's plugins problem.

Update: I tested again on 4.0.54 and my function works

Code: <CollectionView @itemTap="onItemTap"

onItemTap(args) {this.reply = args.item.user;}

`<GridLayout @tap="reply = null" :visibility="reply ? 'visible' : 'collapsed'">

` Sometimes collapse works sometimes not and when it is not working itemTap event not working too. on iOS it's perfect.
farfromrefug commented 2 years ago

@kakha13 that can't work on android. the collection view needs to know the cell height will.change. use an observablearray. then on tap change the value on the item from the observablearray and call setItem to let the collection view know about the change

kakha13 commented 2 years ago

@farfromrefug Oo I'll do it. I think we can close this issue . Thank you for fast response ❤️