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

点击切换Marker,改变当前icon的颜色不生效,数据更新了,组件没有重新render #96

Open
viviya6 opened this issue Dec 8, 2020 · 0 comments

Comments

@viviya6
Copy link

viviya6 commented Dec 8, 2020

markerList.map((item, index) =>
<>
<Marker position={item.position} icon={ currentId === item.id ? 'loc_red' : 'simple_blue'} autoViewport onClick={() => this.iconClick(item)} id={item.id}
onMouseover={() => this.setState({ hoverPosition: item.position })}
/>

点击Marker,改变当前currentId 去改变icon的颜色不生效,数据更新了,组件没有重新render,地图放大或者缩小颜色变化就会重新render,想问下这种情况如何手动去重新render

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