How to use the `step` prop in DataTable?
See original GitHub issueExpected 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:
Steps to Reproduce
- Create a basic DataTable component and a static array of data
- Set
step
as an int - 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:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
If
data
already has all the items in advance then thestep
wouldn’t apply. @IanKBovard can you please take a look at this issue?