Skip to content

listview android bug and fix #1371

Closed
Closed

Description

@x4080

Background :

  • Load item 50, "realizedItems" is 6, this is the item cached to display at the screen
  • Filter the array to 5, scroll up, it will crash because realizedItems>new array

Solution : (list-view.android.js)

    ListView.prototype._notifyScrollIdle = function () {
        var keys = Object.keys(this._realizedItems);
        var i;
        var length = keys.length;
        var view;
        var key;
        for (i = 0; i < length; i++) {
            key = keys[i];
            view = this._realizedItems[key];
            if (view[REALIZED_INDEX]<this.items.length) // FIX
            this.notify({
                eventName: ITEMLOADING,
                object: this,
                index: view[REALIZED_INDEX],
                view: view
            });
        }
    };

IOS is working fine

(EDITED because the first fix is still getting error @Lollipop)

Activity

  1. enchev commented on Feb 4, 2016

    @enchev
    Contributor

    Hey @x4080,

    Why not submit pull request with the fix?

  2. x4080 commented on Feb 4, 2016

    @x4080
    Author

    because i dont know how :)

  3. ErjanGavalji commented on Feb 4, 2016

    @ErjanGavalji
    Contributor

    @x4080, I can lend a hand with that or I can do the pull request for you. I'd recommend you do it to get the full credits of contributing to the open-source project. I'll be glad to assist... Let me know which one you prefer.

  4. x4080 commented on Feb 4, 2016

    @x4080
    Author

    just do it, you guys have this wonderful work and let others to use it, already great things by itself, this is a little tiny contribution for ns community, so you have my blessing :)

  5. ErjanGavalji commented on Feb 4, 2016

    @ErjanGavalji
    Contributor

    @x4080, thanks for the kind words :)

    Can I only ask you to sign our CLA? (Sorry for having to cause that inconvenience...)

    Cheers,
    Erjan

  6. added this to the 1.6.0 milestone on Feb 11, 2016
  7. lock commented on Aug 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  8. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions