Fix map layers select dropdown menu state to reset when Map Layers switch is toggled#1698
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a stale dropdown state issue in the Map Layers basemap Select component by forcing a remount via a key prop when the disabled prop changes.
Changes:
- Added
key={String(props.disabled)}to the basemapSelectcomponent to reset internal state when toggled. - Added a change log entry for the
@itwin/map-layerspackage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/itwin/map-layers/src/ui/widget/BasemapPanel.tsx | Adds key prop on Select to reset internal state on disabled change |
| change/@itwin-map-layers-450debab-e24a-42a0-9785-ce0c8157dbe7.json | Patch changelog entry for the fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aruniverse
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed map layers dropdown selection menu by adding key property to Select component to reset internal state when disabled changes, ensuring the dropdown menu is responsive.
Steps to test: