TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
25.33k stars 3.1k forks source link

Row DnD CodeSandbox Example not working: Error: #1923

Closed alexanderela closed 4 years ago

alexanderela commented 4 years ago

Describe the bug The React Table Row DnD example on CodeSandbox is not working. I get console errors saying, "Cannot read property 'TARGET' of undefined." The error appears to be on line 87, in the Row . component

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/row-dnd'
  2. See error

Thanks in advance and thanks for the excellent React Table!

Screenshots Screen Shot 2020-02-18 at 9 44 43 AM Screen Shot 2020-02-18 at 9 45 16 AM

Desktop (please complete the following information):

alexanderela commented 4 years ago

Found a fix. I had to update the version of react-dnd in the package.json in the https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/row-dnd example.

Replace the existing version for react-dnd in this package.json with the current version of react-dnd (in my case it was "^10.0.2") and it should work fine.

tannerlinsley commented 4 years ago

Would you submit a PR that applies this fix?

ironicbrew commented 4 years ago

Would you submit a PR that applies this fix?

Put together a pull for this: https://github.com/tannerlinsley/react-table/pull/1939

alexsandr1992 commented 4 years ago

Now codesanbox example has access denied. I see message "Request failed with status code 403"

ironicbrew commented 4 years ago

Now codesanbox example has access denied. I see message "Request failed with status code 403"

It's important to note that the url in the examples is hardcoded so If you're testing the pull by looking at the readme in my fork its going to send you to to tannerlinsley's master branch

To test my fix checking out my pull on codesandbox will get you to the fixed branch

As for the 403 This looks to be more an issue with codesandbox than this library, specifically codesandbox's ability to connect to git hub. There was a bit of down time recorded recently with git hub api requests

I was temporarily able to reproduce this error with codesandbox links from other libraries as well. Checking again it seems they have resolved.

examples of sandboxes that were giving me the same error: https://codesandbox.io/s/github/react-dnd/react-dnd/tree/gh-pages/examples_hooks_js/00-chessboard https://codesandbox.io/s/github/react-dnd/react-dnd/tree/gh-pages/examples_hooks_ts/04-sortable/simple

examples that were working: https://codesandbox.io/s/react-new https://codesandbox.io/s/yjzyzr29ov

tannerlinsley commented 4 years ago

Fixed