StreakYC / react-draggable-list

React component for a list of draggable collapsible items
MIT License
325 stars 49 forks source link

Reverse z-index order #34

Open codeNgamer opened 4 years ago

codeNgamer commented 4 years ago

Currently there are 2 behaviors:

  1. leave unsetZIndex as false and you get a z-index that counts up (1,2,3...) from top to bottom
  2. set unsetZIndex to true and you get z-index auto which essentially results in the same behavior as above (even if I set z-index in reverse order on children from template).

How do I go about reversing the order of z-index (5,4,3...) from top to bottom?

Macil commented 4 years ago

That's not currently supported. What's your use-case for this? It's possible for us to add a feature here, but I want to be sure I understand the issue so any changes don't miss the point and be sure there isn't a simpler way to accomplish what you want.

Do the items in your list overlap when at rest, or just when being moved?

codeNgamer commented 4 years ago

The items overlap when at rest. In this case (For sections a, b and c going top to bottom) I use a drop-down in the template and so when drop-down in section a is clicked, it's options show behind section b. I have the reverse-order of z-index working in the sections themselves but since there's a container (MoveContainer) that wraps it, this has no effect