Title: Sectioned ListView may return wrong template · Issue #11133 · NativeScript/NativeScript · GitHub
Open Graph Title: Sectioned ListView may return wrong template · Issue #11133 · NativeScript/NativeScript
X Title: Sectioned ListView may return wrong template · Issue #11133 · NativeScript/NativeScript
Description: Issue Description When using a sectioned ListView the template returned by _getItemTemplate may be wrong if multiple templates are used. _getItemTemplate calls _getDataItem which doesn't consider the structure of the data of a sectioned ...
Open Graph Description: Issue Description When using a sectioned ListView the template returned by _getItemTemplate may be wrong if multiple templates are used. _getItemTemplate calls _getDataItem which doesn't consider t...
X Description: Issue Description When using a sectioned ListView the template returned by _getItemTemplate may be wrong if multiple templates are used. _getItemTemplate calls _getDataItem which doesn't consid...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/11133
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sectioned ListView may return wrong template","articleBody":"### Issue Description\n\nWhen using a sectioned `ListView` the template returned by `_getItemTemplate` may be wrong if multiple templates are used. `_getItemTemplate` calls `_getDataItem` which doesn't consider the structure of the data of a sectioned `ListView`. The method `_getDataItemInSection` is available to get the correct item.\n\nThe issue can be solved by adding a `_getItemTemplateInSection` method that calls `_getDataItemInSection` instead. \n\nOn iOS the methods `tableViewCellForRowAtIndexPath`, `tableViewHeightForRowAtIndexPath` and `_prepareCell` need to be updated to use `_getItemTemplateInSection` when a sectioned `ListView` is used.\n\nOn Android the methods `getItemViewType` and `_createItemView` need to be updated to use `_getItemTemplateInSection`.\n\n\n### Reproduction\n\n_No response_\n\n### Relevant log output (if applicable)\n\n```shell\n\n```\n\n### Environment\n\n```yaml\nOS: macOS 15.7.4\nCPU: (10) arm64 Apple M1 Max\nShell: /bin/zsh\nnode: 22.20.0\nnpm: 10.9.3\nnativescript: 9.0.3\n\n# android\njava: 21.0.9\nndk: Not Found\napis: 35\nbuild_tools: 26.0.2, 27.0.1, 28.0.1, 28.0.3, 30.0.0, 30.0.3, 31.0.0, 32.0.0, 33.0.0, 33.0.1, 33.0.2, 34.0.0, 35.0.0, 35.0.1\nsystem_images: \n - android-31 | Google APIs ARM 64 v8a\n - android-31 | Google Play ARM 64 v8a\n - android-35 | Google Play ARM 64 v8a\n - android-36 | Google Play ARM 64 v8a\n\n# ios\nxcode: 16.4/16F6\ncocoapods: 1.16.2\npython: 2.7.18\npython3: 3.13.7\nruby: 3.3.9\nplatforms: \n - DriverKit 24.5\n - iOS 18.5\n - macOS 15.5\n - tvOS 18.5\n - visionOS 2.5\n - watchOS 11.5\n```\n\n### Dependencies\n\n```json\n\"dependencies\": {\n \"@klippa/nativescript-http\": \"^3.0.4\",\n \"@nativescript-community/ui-material-bottomsheet\": \"^7.2.77\",\n \"@nativescript/core\": \"~9.0.0\",\n \"@nativescript/firebase-core\": \"^5.0.2\",\n \"@nativescript/firebase-crashlytics\": \"^5.0.2\",\n \"@nativescript/firebase-messaging\": \"^5.0.2\",\n \"@nativescript/localize\": \"^5.2.0\",\n \"@nativescript/theme\": \"~3.0.2\",\n \"@nstudio/nativescript-barcodescanner\": \"^5.0.1\",\n \"nativescript-vue\": \"~3.0.0\",\n \"patch-package\": \"^8.0.1\",\n \"pinia\": \"^3.0.4\",\n \"sass\": \"1.70\",\n \"sharp\": \"^0.34.4\",\n \"url-parse\": \"^1.5.10\"\n},\n\"devDependencies\": {\n \"@nativescript/android\": \"~9.0.0\",\n \"@nativescript/ios\": \"9.0.3\",\n \"@nativescript/tailwind\": \"^4.0.7\",\n \"@nativescript/types\": \"~9.0.0\",\n \"@nativescript/webpack\": \"^5.0.31\",\n \"@types/node\": \"^20.19.19\",\n \"@typescript-eslint/eslint-plugin\": \"^8.56.0\",\n \"@typescript-eslint/parser\": \"^8.56.0\",\n \"@vue/eslint-config-typescript\": \"^14.7.0\",\n \"eslint\": \"^10.0.0\",\n \"eslint-plugin-vue\": \"^10.8.0\",\n \"replace-in-file-webpack-plugin\": \"^1.0.6\",\n \"tailwindcss\": \"^4.1.18\",\n \"tsconfig-paths-webpack-plugin\": \"^4.2.0\",\n \"typescript\": \"~5.8.0\"\n}\n```\nNote: some private dependencies have been omitted\n\n### Please accept these terms\n\n- [x] I have searched the [existing issues](https://github.com/NativeScript/NativeScript/issues) as well as [StackOverflow](https://stackoverflow.com/questions/tagged/nativescript) and this has not been posted before\n- [x] This is a bug report\n- [x] I agree to follow this project's [Code of Conduct](https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#coc)","author":{"url":"https://github.com/BozzaDaniel","@type":"Person","name":"BozzaDaniel"},"datePublished":"2026-03-10T13:54:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/11133/NativeScript/issues/11133"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6325c976-4b34-7b19-6921-6aa8a1fd8e94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8BC:33700C:81CFE3:B2A9F8:6A63AF27 |
| html-safe-nonce | 7d94bd5814e17c968cd38a980811ebbbbef6a638a820ae032fe2e5cb1424dcfc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEJDOjMzNzAwQzo4MUNGRTM6QjJBOUY4OjZBNjNBRjI3IiwidmlzaXRvcl9pZCI6IjgwMzM5NjcxMDYxMzU2NjY0NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1b0aa58c009de7af31b100bf150bcd25cb45bcf7ff3be715e5cc04acbe45081b |
| hovercard-subject-tag | issue:4051973116 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/11133/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e7fe3cef91e4d3de601dfba165bd6da1c96ca208c2ff4b953147c5d7b226d976/NativeScript/NativeScript/issues/11133 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e7fe3cef91e4d3de601dfba165bd6da1c96ca208c2ff4b953147c5d7b226d976/NativeScript/NativeScript/issues/11133 |
| og:image:alt | Issue Description When using a sectioned ListView the template returned by _getItemTemplate may be wrong if multiple templates are used. _getItemTemplate calls _getDataItem which doesn't consider t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BozzaDaniel |
| hostname | github.com |
| expected-hostname | github.com |
| None | c69b5576237034cb6ab5477391df7811093a00579a751b33bed4b527d68aade6 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5c31956f7a31ef033ef93ba813dcb6f7e8eb0972 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width