question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use the `step` prop in DataTable?

See original GitHub issue

Expected Behavior

According to the docs, step is “How many items to render at a time.” I understand this to control the number of rows displayed per page by DataTable.

Actual Behavior

The number of items displayed bears no relationship to the number in step.

URL, screen shot, or Codepen exhibiting the issue

I copied the sandbox example, adding the step prop, into https://codesandbox.io/s/dark-haze-wzn76?file=/src/App.js The DATA array has 6 elements:

Screen Shot 2020-10-02 at 13 42 34 Screen Shot 2020-10-02 at 13 44 21

Steps to Reproduce

  1. Create a basic DataTable component and a static array of data
  2. Set step as an int
  3. Get any number of rows

Your Environment

  • Grommet version: 2.15.0
  • Browser Name and version: Chrome 83.0.4103.97 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): macOS 10.15.6 Catalina

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
carolina-cascadecommented, Oct 2, 2020

Yeah, that could work. I am implementing a table inside a modal (crazy, but those are my specs), so InfiniteScroll will not work. But I can paginate manually.

Thank you again for your super quick response.

1reaction
ShimiSuncommented, Oct 2, 2020

If data already has all the items in advance then the step wouldn’t apply. @IanKBovard can you please take a look at this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Data Tables with React JS Functional ...
I'm Impress with Data Tables which is provide best Responsive and I want to use in React JS but i did not get...
Read more >
ReactJS DataTables - Render Props, Sorting (Part 1) - YouTube
Previous video: https://youtu.be/Pj_wYgCkjqI [GET MENTORED] Level up your skills with one on one private mentorship via Zoom!
Read more >
Getting Started - FixedDataTable
The easiest way to start using FixedDataTable is to install it via npm: npm install react --save npm install fixed-data-table-2 --save.
Read more >
React Table: A complete tutorial with examples
In this React table tutorial, we'll show you how to implemenet your own data table in React using react-table, complete with examples.
Read more >
Building a Data Table Component in React — Development
First, create a basic data table component that receives as props an array of headings and an array of rows. Map over these...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found