Skip to content
Snippets Groups Projects
Commit a9586b23 authored by Anton Kulyk's avatar Anton Kulyk Committed by Nemanja
Browse files

Add drag-n-drop to collection items tables (#16360)


* Don't wrap ItemDragSource children with <div />

react-dnd allows wrapping only native DOM elements with DND helpers.

With the new table layout, we now need to drag table rows (td elements).

Rendering a td with ItemDragSource results in invalid HTML as table body's direct children should only include td elements.

* Rename `selected` prop to `selectedItems`

* Pass ItemDragSource props to table item

* Replace styled TableRow with plain <tr />

Table row is wrapped with ItemDragSource, that only accepts native DOM elements as its children

So styled-components can't be used here

* Make table row draggable

* Add headless mode to BaseItemsTable

* Add prop hiding table row's bottom border

* Fix typo and split large comment

* Render full table row when dragging

* Add empty PinnedItemsTable drop area

* Add empty ItemsTable drop area

* Wrap PinnedItemsTable with drop area

* Wrap ItemsTable with drop area

* Extract `<tr />` style

Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>

* Fix width style

Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>

* Run prettier

* Reference issue about post-pulses work

Co-authored-by: default avatarGustavo Saiani <gustavo@poe.ma>
parent a2972781
No related branches found
No related tags found
No related merge requests found
Showing
with 274 additions and 163 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment