gregnb / gregnb/mui-datatables

2 tables on the same page causes React non-unique id warning

Open
#1,519 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
905
PR merge metrics
No merged PRs in 30d

Description

## Expected Behavior
When rendering multiple tables on the same page, I expect them to render without warnings.

## Current Behavior
React throw a warning in the console: `Found 2 elements with non-unique id #pagination-next`

![image](https://user-images.githubusercontent.com/8313853/93495171-70a6f800-f8d3-11ea-8fb4-9535710a2d6c.png)

## Steps to Reproduce (for bugs)
Just render two tables on the same page.

Sandbox with code to reproduce (codesandbox doesn't show the error, have to run locally)
https://codesandbox.io/s/upbeat-mclaren-che94

## Your Environment
| Tech | Version |
|--------------|---------|
| @material-ui/core | 4.11.0 |
| @material-ui/icons | 4.9.1 |
| MUI-datatables | 3.4.1 |
| React | 16.13.1 |
| browser | Chrome |
| NextJS | 9.5.3 |

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the linked CodeSandbox reproduction locally and inspect how pagination elements are rendered when two tables are present. Done means rendering multiple tables without React's non-unique #pagination-next warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.