Skip to content

getSelectedModels broken for pageable collections #14

@ZECTBynmo

Description

@ZECTBynmo

I'm using a server-side paginated PageableCollection, and the select-all extension. When I click select all, the checkboxes do stay selected as I navigate between pages, but getSelectedModels returns the wrong thing.

For example, in a 500 element collection with 25 item page size, this is the output after checking select-all on the first page:

window.research.requestResultsTable.grid.getSelectedModels()
[child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child]

Notice that the models included are only the ones on the first page.

Now, if I navigate to page 2, and try it again, the output is even worse:

window.research.requestResultsTable.grid.getSelectedModels()
[undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child, child]

Notice that we now have 50 items in the output, and the first half of them are undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions