This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115
stars
21
forks
source link
RadListView grouping crash when groupingFunction is not bound to viewmodel #1513
Please take a minute to read our NativeScript Code of Conduct before proceeding with posting issues or discussing. The purpose of this guide is to make communication and cooperation within our forums a pleasure for you and the other members.
Please, provide the details below:
Tell us about the problem
When setting the groupingFunction in XML like this:
and defining the groupingFunction lin the code-behind like this:
//main-page.ts
export function myGroupingFunc(item: DataItem): string {
return item.category;
}
The app crashes with the following log:
Android:
System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onCreateView failed
System.err: TypeError: owner.groupingFunction is not a function
System.err:
System.err: StackTrace:
System.err: ListViewGroupDescriptorImpl.groupForItem(file: node_modules/nativescript-ui-listview/ui-listview.android.js:1090:0)
System.err: at loadData(file: node_modules/nativescript-ui-listview/ui-listview.android.js:2063:0)
System.err: at createNativeView(file: node_modules/nativescript-ui-listview/ui-listview.android.js:1178:0)
System.err: at _setupUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:525:0)
System.err: at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:567:0)
System.err: at eachChildView(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:101:0)
System.err: at eachChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:700:0)
System.err: at _setupUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:566:0)
System.err: at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:567:0)
System.err: at eachChildView(file: node_modules/@nativescript/core/ui/content-view/index.js:65:0)
System.err: at eachChildView(file: node_modules/@nativescript/core/ui/page/page-common.js:98:0)
System.err: at eachChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:700:0)
System.err: at _setupUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:566:0)
System.err: at _addViewCore(file: node_modules/@nativescript/core/ui/core/view-base/index.js:429:0)
System.err: at _addView(file: node_modules/@nativescript/core/ui/core/view-base/index.js:418:0)
System.err: at onCreateView(file: node_modules/@nativescript/core/ui/frame/index.android.js:740:0)
System.err: at onCreateView(file: node_modules/@nativescript/core/ui/frame/fragment.android.js:25:0)
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1175)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1153)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1149)
System.err: at com.tns.FragmentClass.onCreateView(FragmentClass.java:55)
System.err: at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2699)
System.err: at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:320)
System.err: at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1199)
System.err: at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1368)
System.err: at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1446)
System.err: at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1509)
System.err: at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)
System.err: at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2181)
System.err: at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2004)
System.err: at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1959)
System.err: at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1861)
System.err: at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)
System.err: at android.os.Handler.handleCallback(Handler.java:883)
System.err: at android.os.Handler.dispatchMessage(Handler.java:100)
System.err: at android.os.Looper.loop(Looper.java:214)
System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Please, provide the details below:
Tell us about the problem
When setting the groupingFunction in XML like this:
and defining the groupingFunction lin the code-behind like this:
The app crashes with the following log:
Which platform(s) does your issue occur on?
Android and iOS
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.
Start the application
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
ns-rlv-grouping.zip