8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 951c779 commit 2240cbdCopy full SHA for 2240cbd
examples/components/filter.tsx
@@ -3,15 +3,9 @@ import { ReactSortable, ItemInterface } from "../../src";
3
import { Item, threes } from "../util";
4
import styled from "styled-components";
5
6
-function createState() {
7
- return threes().map((item, index) => ({
8
- ...item,
9
- filter: index === 2
10
- })) as ItemInterface[];
11
-}
12
13
export function Filter() {
14
- const [list, setList] = useState(createState);
+ const [list, setList] = useState(threes);
15
return (
16
<ReactSortable
17
filter=".filter"
@@ -20,7 +14,7 @@ export function Filter() {
20
animation={150}
21
>
22
{list.map(item => (
23
- <CustomItem className={item.filter ? "filter" : ""} key={item.id}>
+ <CustomItem key={item.id}>
24
18
{item.name}
25
19
</CustomItem>
26
))}
0 commit comments