Fix Additional Packages dropdown becoming permanently disabled #75
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.
Fixes issue where the Additional Packages dropdown becomes permanently disabled after selecting "Virtual" control type, preventing users from modifying package selections when switching back to other control types.
Problem
When users select "Virtual" from the Control Type dropdown, the Additional Packages dropdown is correctly disabled and set to "Fluent UI". However, when switching back to "Standard" or other control types, the dropdown remains disabled, making it impossible to change additional package selections.
Additionally, when loading existing controls, saved additional package selections were not being restored from the
AdditionalPackageIndexproperty.Root Cause
cboxControlType_SelectedIndexChangedevent handler only handled the "Virtual" case but had noelseclause to re-enable the dropdown for other control typesPopulateControlDetailsmethod wasn't restoring the savedAdditionalPackageIndexvalue when loading existing controlsAdditionalPackageIndexproperty wasn't initialized to a default value, potentially causing inconsistent behaviorSolution
Made three minimal changes:
1. Enhanced Event Handler
2. Restore Saved Selection
3. Default Initialization
Testing
The fix ensures:
Resolves the issue reported in version 2.20263.6.162 where users experienced the "Additional package selection is required prompt is appearing while trying to build control and that selection is disabled."
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.