Closed Zykhatslover closed 4 years ago
I guess you can just have a big top-level conditional to simply render your list of items without using react-movable
?
Mmmh yes I could go for that, but that would duplicate a whole bunch of code and this is what I was trying to avoid, but that's my last option indeed.. Currently, I'm simply allowing any movement, but I cancel it and show a warning if movements are not allowed but an option would be way better
You can also disable items: https://github.com/tajo/react-movable/blob/master/examples/Disabled.tsx#L9
Replacing the whole UI works, but the downside is that if it is a scroll container and you've scrolled down, when the component is swapped out for the static version, it'll pop back up to the top.
My use case for wanting to disable all moves is to prevent further moves while an API call is being made. Would you consider a disabled
prop to List
, which would prevent any moves from occurring?
I could find an option to entirely disable any movements (let's say I want to lock the table to prevent any action on it).
Is there any change you could add this as a feature or maybe there's already something I could do to mimic it?
Thank's! :-)