René's URL Explorer Experiment


Title: fix(listview): correct item template resolution in sectioned ListView by VeinDevTtv · Pull Request #11184 · NativeScript/NativeScript · GitHub

Open Graph Title: fix(listview): correct item template resolution in sectioned ListView by VeinDevTtv · Pull Request #11184 · NativeScript/NativeScript

X Title: fix(listview): correct item template resolution in sectioned ListView by VeinDevTtv · Pull Request #11184 · NativeScript/NativeScript

Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. You have signed the CLA. All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/DevelopmentWorkflow.md#running-unit-tests-application. Tests for the changes are included - https://github.com/NativeScript/NativeScript/blob/master/tools/notes/WritingUnitTests.md. What is the current behavior? When using a sectioned ListView with multiple item templates and an itemTemplateSelector, the wrong template is returned for items. _getItemTemplate(index) calls _getDataItem(index) which reads directly from this.items[index]. In sectioned mode, this.items is an array of section objects (e.g. { title, items }), so indexing it by row number returns a section object instead of the actual row data item. The itemTemplateSelector then receives the wrong data and resolves the wrong template key, causing incorrect cell types to be recycled and rendered. On iOS, _prepareCell contained a broken absoluteIndex workaround that summed up items across sections and fed that offset back into the same flat _getItemTemplate — which still hits this.items[absoluteIndex] on the sectioned top-level array, returning another section object. What is the new behavior? A new method _getItemTemplateInSection(section, index) is added to ListViewBase. It uses _getDataItemInSection to correctly fetch the row item from within its section, and _getItemsInSection to pass the section's own items array to the itemTemplateSelector — matching the same contract that _prepareItemInSection uses for binding contexts. All call sites that select a template for a sectioned row are updated to use this method: iOS: tableViewCellForRowAtIndexPath, tableViewHeightForRowAtIndexPath, and _prepareCell (replacing the broken absoluteIndex workaround). Android: getItemViewType and _createItemView. Fixes #11133.

Open Graph Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

X Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

Opengraph URL: https://github.com/NativeScript/NativeScript/pull/11184

X: @github

direct link

Domain: Github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b35db090-1f3f-0fe6-bbba-7eb12a392652
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC0C:25D1F8:C49544:118D167:6A6386CD
html-safe-noncecc12682c937456e5242f02a649bf706d2f9223030d68ae42552d9719d0ef47a1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzBDOjI1RDFGODpDNDk1NDQ6MTE4RDE2Nzo2QTYzODZDRCIsInZpc2l0b3JfaWQiOiI2ODM5NzgwMjIxNDY4NzcyMDQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace83e072f6b328eb6e720a4a7b36dec5e739d3984b1bc646d8931976b8fa4f8fc
hovercard-subject-tagpull_request:3551242093
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/11184/files
twitter:imagehttps://avatars.githubusercontent.com/u/142545968?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/142545968?s=400&v=4
og:image:altPR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee4fb64aef87da454ec25b158147f7f5f14aef29216e5ca1612c2e48faa599d1f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee839936ba5faffb9c836dda1cf4729d50c88a32e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://Github.com/NativeScript/NativeScript/pull/11184/files#start-of-content
https://Github.com/
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11184%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11184%2Ffiles
Sign up https://Github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://Github.com/NativeScript/NativeScript/pull/11184/files
Reloadhttps://Github.com/NativeScript/NativeScript/pull/11184/files
Reloadhttps://Github.com/NativeScript/NativeScript/pull/11184/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11184/files
NativeScript https://Github.com/NativeScript
NativeScripthttps://Github.com/NativeScript/NativeScript
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11184/files
Notifications https://Github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://Github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.6k https://Github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://Github.com/NativeScript/NativeScript
Issues 771 https://Github.com/NativeScript/NativeScript/issues
Pull requests 66 https://Github.com/NativeScript/NativeScript/pulls
Discussions https://Github.com/NativeScript/NativeScript/discussions
Actions https://Github.com/NativeScript/NativeScript/actions
Projects https://Github.com/NativeScript/NativeScript/projects
Wiki https://Github.com/NativeScript/NativeScript/wiki
Security and quality 0 https://Github.com/NativeScript/NativeScript/security
Insights https://Github.com/NativeScript/NativeScript/pulse
Code https://Github.com/NativeScript/NativeScript
Issues https://Github.com/NativeScript/NativeScript/issues
Pull requests https://Github.com/NativeScript/NativeScript/pulls
Discussions https://Github.com/NativeScript/NativeScript/discussions
Actions https://Github.com/NativeScript/NativeScript/actions
Projects https://Github.com/NativeScript/NativeScript/projects
Wiki https://Github.com/NativeScript/NativeScript/wiki
Security and quality https://Github.com/NativeScript/NativeScript/security
Insights https://Github.com/NativeScript/NativeScript/pulse
Sign up for GitHub https://Github.com/signup?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://Github.com/login?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
VeinDevTtvhttps://Github.com/VeinDevTtv
NativeScript:mainhttps://Github.com/NativeScript/NativeScript/tree/main
VeinDevTtv:fix/sectioned-listview-item-template-selectorhttps://Github.com/VeinDevTtv/NativeScript/tree/fix/sectioned-listview-item-template-selector
Conversation 2 https://Github.com/NativeScript/NativeScript/pull/11184
Commits 2 https://Github.com/NativeScript/NativeScript/pull/11184/commits
Checks 3 https://Github.com/NativeScript/NativeScript/pull/11184/checks
Files changed https://Github.com/NativeScript/NativeScript/pull/11184/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11184/files
fix(listview): correct item template resolution in sectioned ListView https://Github.com/NativeScript/NativeScript/pull/11184/files#top
Show all changes 2 commits https://Github.com/NativeScript/NativeScript/pull/11184/files
43bae1b fix(listview): use section-aware template lookup in sectioned ListView VeinDevTtv Apr 19, 2026 https://Github.com/NativeScript/NativeScript/pull/11184/commits/43bae1ba973b096e88801d5bc8337f605f733d5d
97ab92a test(listview): add unit tests for sectioned ListView template select… VeinDevTtv Apr 19, 2026 https://Github.com/NativeScript/NativeScript/pull/11184/commits/97ab92a371b3bb51c1de4f11918d8d7c5fee5d4d
Clear filters https://Github.com/NativeScript/NativeScript/pull/11184/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11184/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11184/files
list-view-tests.ts https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-6235e5fe8599efcf01dc37b8d1eb8fac2e27c592831d4c9ea20b28504c83544e
index.android.ts https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-3d7e4e660610c7d32b22372e311dbee988714ebf5ef40418f96fa1abaf365cda
index.ios.ts https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
list-view-common.ts https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-d36a5a6c050c4a467f941138a072c4b096142a82acc8f98122f68afcc2914c7c
apps/automated/src/ui/list-view/list-view-tests.tshttps://Github.com/NativeScript/NativeScript/pull/11184/files#diff-6235e5fe8599efcf01dc37b8d1eb8fac2e27c592831d4c9ea20b28504c83544e
View file https://Github.com/NativeScript/NativeScript/blob/97ab92a371b3bb51c1de4f11918d8d7c5fee5d4d/apps/automated/src/ui/list-view/list-view-tests.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/NativeScript/NativeScript/pull/11184/{{ revealButtonHref }}
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-6235e5fe8599efcf01dc37b8d1eb8fac2e27c592831d4c9ea20b28504c83544e
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-6235e5fe8599efcf01dc37b8d1eb8fac2e27c592831d4c9ea20b28504c83544e
packages/core/ui/list-view/index.android.tshttps://Github.com/NativeScript/NativeScript/pull/11184/files#diff-3d7e4e660610c7d32b22372e311dbee988714ebf5ef40418f96fa1abaf365cda
View file https://Github.com/NativeScript/NativeScript/blob/97ab92a371b3bb51c1de4f11918d8d7c5fee5d4d/packages/core/ui/list-view/index.android.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/NativeScript/NativeScript/pull/11184/{{ revealButtonHref }}
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-3d7e4e660610c7d32b22372e311dbee988714ebf5ef40418f96fa1abaf365cda
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-3d7e4e660610c7d32b22372e311dbee988714ebf5ef40418f96fa1abaf365cda
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-3d7e4e660610c7d32b22372e311dbee988714ebf5ef40418f96fa1abaf365cda
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-3d7e4e660610c7d32b22372e311dbee988714ebf5ef40418f96fa1abaf365cda
packages/core/ui/list-view/index.ios.tshttps://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
View file https://Github.com/NativeScript/NativeScript/blob/97ab92a371b3bb51c1de4f11918d8d7c5fee5d4d/packages/core/ui/list-view/index.ios.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/NativeScript/NativeScript/pull/11184/{{ revealButtonHref }}
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-109fe87276fc63608c7aebe8b6a51bed1e83d33a7719083b4607706464d9f209
packages/core/ui/list-view/list-view-common.tshttps://Github.com/NativeScript/NativeScript/pull/11184/files#diff-d36a5a6c050c4a467f941138a072c4b096142a82acc8f98122f68afcc2914c7c
View file https://Github.com/NativeScript/NativeScript/blob/97ab92a371b3bb51c1de4f11918d8d7c5fee5d4d/packages/core/ui/list-view/list-view-common.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/NativeScript/NativeScript/pull/11184/{{ revealButtonHref }}
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-d36a5a6c050c4a467f941138a072c4b096142a82acc8f98122f68afcc2914c7c
https://Github.com/NativeScript/NativeScript/pull/11184/files#diff-d36a5a6c050c4a467f941138a072c4b096142a82acc8f98122f68afcc2914c7c
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11184/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.