You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
323 B
13 lines
323 B
|
3 years ago
|
import memoizeOne from 'memoize-one';
|
||
|
|
import type { DraggableDimension } from '../types';
|
||
|
|
|
||
|
|
export default memoizeOne(
|
||
|
|
(
|
||
|
|
remove: DraggableDimension,
|
||
|
|
list: DraggableDimension[],
|
||
|
|
): DraggableDimension[] =>
|
||
|
|
list.filter(
|
||
|
|
(item: DraggableDimension) => item.descriptor.id !== remove.descriptor.id,
|
||
|
|
),
|
||
|
|
);
|