react-sortablejs
react-sortablejs copied to clipboard
How to use filter option?
Hi.
I'm trying to exclude some items from sorting. So, I use "filtered: true" option. But nothing happens.
Here is sandbox example - https://codesandbox.io/s/peaceful-agnesi-qupz4?file=/src/App.js
You probably gave up, or found another way.. I spend some time trying to make it work.. So I'll leave an example for any other lost soul.
<ReactSortable list={listItems} filter={".static"} >
<Component />
<Component className={"static"} />
<Component className={"static"} />
</ReactSortable>
This will disable movement of the 2nd and 3rd component, but the 1st can get between or bellow them. #184
My lost soul thanks you @bozhich !