Do we really have to implement our own Sortable element? #1420
Closed
anthonysgro
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Forgive me because I am somewhat of a novice when it comes to UI. But I came to this library because I was interested in the sortable presets like this: https://master--5fc05e08a4a65d0021ae0bf2.chromatic.com/?path=/docs/presets-sortable-vertical--removable-items
However, I was soon facing some daunting tasks. I followed https://docs.dndkit.com/presets/sortable which gave me some issues because I was using Typescript and not Javascript, but got an extremely simple example running.
But when I went to implement the vertical removable items example, it really starting hitting me. Do we have to completely re-implement the Sortable file here: https://github.com/clauderic/dnd-kit/blob/master/stories/2%20-%20Presets/Sortable/Sortable.tsx
We have to pick and choose which props to allow, and we have to completely implement how these props interact with the children of Sortable. I feel like this is a huge oversight, surely there must be some kind of Sortable export with default prop values that we can override? Maybe I am not making sense, or maybe this is a purposeful design decision to give power to the user (in which case I am not good enough at typescript and front-end coding to fully take advantage of that lol)
inb4 skill issue
Beta Was this translation helpful? Give feedback.
All reactions