triniwiz / nativescript-pager

Apache License 2.0
90 stars 48 forks source link

Pager discards global context #181

Open I-NOZex opened 4 years ago

I-NOZex commented 4 years ago

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.

I'm using this plugin to globally handle translations ( @panter/vue-i18next ), but inside a Pager component I get this error:

JS: [Vue warn]: Error in render: "TypeError: Cannot read property 't' of undefined"
JS:
JS: (found in <Root>)
JS: [Vue warn]: Error in v-on handler: "TypeError: Cannot read property 't' of undefined"
System.err: Application uncaught exception in thread "main" com.tns.NativeScriptException: Calling js method onBindViewHolder failed
System.err: TypeError: Cannot read property 't' of undefined
System.err:     at com.tns.Runtime.callJSMethodNative(Native Method)
System.err:     at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
System.err:     at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1160)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1138)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1134)
System.err:     at com.tns.gen.androidx.recyclerview.widget.RecyclerView_Adapter_vendor_99235_26_PagerRecyclerAdapterImpl.onBindViewHolder(RecyclerView_Adapter_vendor_99235_26_PagerRecyclerAdapterImpl.java:51)

My suspicion is that in some way, the Pager context loses or discards the global Vue context.