🐛 [BUG] Choropleth多次调用update去更新label中的field属性,会失效
- Dominant language
- TypeScript
- Stars
- 91
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
### 🐛 Bug description [Please make everyone to understand it]
初始化进来去切换数据区域这个checkbox,是可以实现显示或关闭数据区域的label的,但是一旦我切换过全部区域这个checkbox之后,我再去切换数据区域这个checkbox就会失效了,感觉像是在调用update方法后,依然保留了上一次的结果,我的代码逻辑时没有问题的。
> Please provide a link by forking these links [L7Plot](https://codesandbox.io/s/l7plot-issue-template-ckpvq?file=/src/index.ts) or GitHub repo, a minimal reproduction.
[复现链接](https://codesandbox.io/s/unruffled-hypatia-rslgwr?file=/index.ts)
- _Required_ **Link to minimal reproduction**:
### 📷 Step to reproduce
https://user-images.githubusercontent.com/44153856/224955090-6ad9ce5b-85f4-4cc1-ad7b-9700506e5a1d.mov
大佬短暂的看过一眼,这里是记录,辅助一下

### 🏞 Expected result
### 🚑 Any additional [like screenshots]
- **L7Plot Version**: 0.5.1
- **Platform**: masos
Contributor guide
Research direction
Start with the linked CodeSandbox reproduction in index.ts and trace how Choropleth update handles the label field after the two region checkboxes are toggled. Reproduce the sequence, then verify that switching the data-region checkbox still shows and hides the labels correctly after switching all regions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100