How to implement variable width horizontal sorting list properly? #713
-
Screen.Recording.2022-04-25.at.4.35.46.PM.movApologies if this is a very basic ask, but I am at a loss as to what's wrong here. As you can see, the widths are not being calculated properly and the transforms are all off. I am really trying to replicate the Here is my repro: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I can see that I was incorrectly using the index as the id. Just logical errors in the onDragStart/End handlers, in case that helps anyone. |
Beta Was this translation helpful? Give feedback.
-
Hi @samesfahani-tuplehealth, thank you for sharing your Typescript code! 🙂 I've been struggling for 3 hours trying to get a simple vertical sortable component. Yours was the first example I saw using objects, not strings, as items. 🙌 And now I understand we MUST use an "id" property as item identifier. 🤦♂️ I now have to find a way to convert my data's "uids". 🤷♂️ |
Beta Was this translation helpful? Give feedback.
I can see that I was incorrectly using the index as the id. Just logical errors in the onDragStart/End handlers, in case that helps anyone.