ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Wrong return value for last section header in virtualScroll ion-list

Open szerner opened this issue 10 years ago • 4 comments

In longer VirtualScroll Lists with Section Headers (<ion-item-divider>), the function for the header content ([headerFn]) has the following issue:

The return value of the headerFn is the list item itself and not the defined function result.

The issue shows ONLY:

  1. for the LAST section header
  2. if the list is longer than the current viewport, so that not all of the list can be rendered on screen
  3. if there is only ONE item below the LAST section header

What behavior are you expecting?

The last section header should show the correct return value of the defined headerFn.

Which Ionic Version? 2.0 beta 10

Plunker that shows an example of your issue

http://plnkr.co/edit/01aad67LMPG60wmNVAAl?p=preview

Cordova CLI: 6.2.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
OS:
Node Version: v5.11.1

szerner avatar Jul 20 '16 13:07 szerner

This is still an issue in beta.11. My app often runs into this issue since I do search filtering of my list and I couldn't figure out any workaround. In that special cases the headerFn simply is ignored, so I cannot react with an if-statement or so.

szerner avatar Aug 09 '16 08:08 szerner

Same issue here, last return value is an object instead of return value.

abhayastudios avatar Aug 17 '16 21:08 abhayastudios

+1

lisamarie2000 avatar Aug 26 '16 10:08 lisamarie2000

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

ionitron-bot[bot] avatar Mar 26 '18 19:03 ionitron-bot[bot]