Build a datatable component, step by step.

Rows per page

To the right of the search bar, we will add a control to set the number of rows displayed in the table

We create a RowsPerPage.svelte component. Then we add it into the header element in Main.svelte.

We will see later how to manage the pagination.

  • Code
  • Result
  • Data