Skip to content

server example - _.slice start end #2

@MichaelChambers

Description

@MichaelChambers

In server.component.ts loadData, you have
this.data = _.slice(this.data, this.activePage, this.activePage + this.rowsOnPage);

For me, that didn't work correctlly as the display was only increasing one row at a time. I have:

	const start :number = (this.activePage - 1) * this.rowsOnPage,
		end :number = _.min([start + this.rowsOnPage, this.data.length]);
	this.data = _.slice(this.data, start, end);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions