Skip to content

Commit

Permalink
Revert change in component
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Dec 26, 2023
1 parent 66156c4 commit 993ac56
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/components/LayerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,20 @@ class LayerListContainer extends React.Component<LayerListContainerProps, LayerL
}
}

const LayerListContainerSortable = SortableContainer((props: LayerListContainerProps) => <LayerListContainer {...props} />)

Check warning on line 313 in src/components/LayerList.tsx

View workflow job for this annotation

GitHub Actions / build on ubuntu-latest

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 313 in src/components/LayerList.tsx

View workflow job for this annotation

GitHub Actions / build on windows-latest

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 313 in src/components/LayerList.tsx

View workflow job for this annotation

GitHub Actions / build on macos-latest

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

type LayerListProps = LayerListContainerProps & {
onMoveLayer: SortEndHandler
};

export default class LayerList extends React.Component<LayerListProps> {
render() {
return React.createElement(SortableContainer((props: LayerListContainerProps) => <LayerListContainer {...props} />), {
...this.props,
helperClass: 'sortableHelper',
onSortEnd: this.props.onMoveLayer.bind(this),
useDragHandle: true,
shouldCancelStart: () => false,
});
return <LayerListContainerSortable
{...this.props}
helperClass='sortableHelper'
onSortEnd={this.props.onMoveLayer.bind(this)}
useDragHandle={true}
shouldCancelStart={() => false}
/>
}
}

0 comments on commit 993ac56

Please sign in to comment.