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

如何设置DragSortableView 选中的item阴影 #149

Open
FlynnZhouZz opened this issue May 9, 2022 · 0 comments
Open

如何设置DragSortableView 选中的item阴影 #149

FlynnZhouZz opened this issue May 9, 2022 · 0 comments

Comments

@FlynnZhouZz
Copy link

一开始我的尝试的实现方法思路是,在item组件中监听当前选中的index,选中即给当前引用样式。代码如下:
image

可当我跑的时候发现,长按item时,列表重新刷新了,也就无法进行拖拽了。

最终我改了DragSortableView源码才实现了我想要的效果。

源码更改如下:
1、在state中添加moveIndex: ''
2、在_renderItemView中修改如下:
image
3、在endTouch方法末尾添加this.setState({ moveIndex: '' });

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

1 participant