Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use filter option? #183

Open
morozovkirill opened this issue Sep 28, 2020 · 2 comments
Open

How to use filter option? #183

morozovkirill opened this issue Sep 28, 2020 · 2 comments

Comments

@morozovkirill
Copy link

morozovkirill commented Sep 28, 2020

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

@bozhich
Copy link

bozhich commented Nov 21, 2020

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

@aurels
Copy link

aurels commented Dec 18, 2023

My lost soul thanks you @bozhich !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants