react-sortable-hoc icon indicating copy to clipboard operation
react-sortable-hoc copied to clipboard

nested react-sortable-hoc conflict, react-sortable-hoc.esm.js:1380 Uncaught TypeError: Cannot read property 'top' of undefined

Open amirjanyanIT opened this issue 6 years ago • 1 comments

in my module i'm using this hoc in nested variant, when i trying to sort in second level sortable elements, parent level sorting getting stuck

here are my repo: https://github.com/amirjanyanIT/react-form-designer

parent level you can find in /src/index.js second level you can find in "/src/Options/MultiSelect/index.js", "/src/Options/DropDown/index.js"

actualy i tryed change keys of sortableElements from numeric into string variant but problem not gone

amirjanyanIT avatar Aug 16 '20 19:08 amirjanyanIT

I solved my issue, problem in SortableElement wich wrapper component or tag always should be same, i just wrapped all my conditional changes in div and problem gone :)

amirjanyanIT avatar Aug 17 '20 11:08 amirjanyanIT