Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with types #1255

Open
5 tasks done
TigerWolf opened this issue Oct 14, 2024 · 0 comments
Open
5 tasks done

Issues with types #1255

TigerWolf opened this issue Oct 14, 2024 · 0 comments

Comments

@TigerWolf
Copy link

TigerWolf commented Oct 14, 2024

Issue Check list

  • Agree to the Code of Conduct
  • Read the README
  • You are using React 16.8.0+
  • You installed styled-components
  • Include relevant code or preferably a code sandbox

Describe the bug

When upgrading to 7.6.2 from 7.2.1, the DataTable no longer renders.

To Reproduce

Steps to reproduce the behavior:

  1. Upgrade to 7.6.2
  2. View any page with DataTable present
  3. See Error in console
Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Expected behavior

No error and page renders

Code Sandbox, Screenshots, or Relevant Code

I was able to replicate in Codepen but I got a different error:

https://codepen.io/TigerWolf/pen/NWQpxpj

TypeError: l.current is null
    useState React
    fo index.es.js:383
    Ro index.es.js:383

This even happens if I just use the example code from the documentation

import DataTable from 'react-data-table-component';

const columns = [
	{
		name: 'Title',
		selector: row => row.title,
	},
	{
		name: 'Year',
		selector: row => row.year,
	},
];

const data = [
  	{
		id: 1,
		title: 'Beetlejuice',
		year: '1988',
	},
	{
		id: 2,
		title: 'Ghostbusters',
		year: '1984',
	},
]

function MyComponent() {
	return (
		<DataTable
			columns={columns}
			data={data}
		/>
	);
};

Versions (please complete the following information)

  • React 18.3.1
  • Styled Components 6.1.13
  • OS: OSX and Linux
  • Browser - Chrome and Firefox

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant