[Bug] Source does not update cluster options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.5k
- Forks
- 1.4k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 3
Description
Description
Changing the cluster property on a <Source> component does not update the cluster options of the source.
Expected Behavior
setClusterOptions() should be called on the source, instead only setData is called
Steps to Reproduce
https://codesandbox.io/p/devbox/fancy-dew-9ks4tr
The "Cluster" button should switch between clustered and unclustered, but nothing happens. To see what should happen fork the sandbox and change the default clustered state.
Environment
- Framework version: react-map-gl@8.0.4
- Map library: maplibre-gl@5.7.0
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read modules/react-maplibre/src/components/source.ts around line 57 and compare the handling of setData with the cluster prop. Use the linked CodeSandbox to reproduce the issue by toggling the Cluster button. Done means changing cluster causes setClusterOptions() to update the source between clustered and unclustered behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100