-
Notifications
You must be signed in to change notification settings - Fork 8
Bugfix/disabled #10
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
Bugfix/disabled #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a Disabled parameter to the SimpleMultiselect component to prevent user interaction when the component is disabled. The implementation includes proper state handling to close the dropdown when disabled and prevent toggling actions.
Key changes:
- Added the
disabledHTML attribute to the dropdown button when theDisabledparameter is true - Implemented logic to close the dropdown when the component becomes disabled
- Added a guard in the toggle method to prevent opening when disabled
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| SimpleMultiselect.razor | Added disabled attribute to button and logic to close dropdown when disabled |
| DisabledTests.cs | Comprehensive test coverage for disabled functionality scenarios |
| StylingTests.cs | Moved styling-related tests to dedicated file |
| SimpleMultiselectTests.cs | Refactored to use BaseTest and removed moved tests |
| BaseTest.cs | Created base test class with shared setup and helper methods |
| TestValueItem.cs | Extracted test model to separate file |
| TestReferenceItem.cs | Extracted test model to separate file |
| EqualityTests.cs | Moved equality-related tests to dedicated file |
| DisabledDropdown.razor | Added demo page for disabled functionality |
| NavMenu.razor | Added navigation link to the disabled dropdown demo |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @bind-SelectedOptions="_selectedItems"/> | ||
| </div> | ||
| <div class="col-4"> | ||
| <button class="btn btn-primary" @onclick="() => _isDisabled = !_isDisabled"> |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space in '_isDisabled =' - should be single space. Change _isDisabled = to _isDisabled =.
| @code { | ||
| private bool _isDisabled; | ||
|
|
||
| private HashSet<string> _selectedItems = []; |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field '_selectedItems' can be 'readonly'.
| private HashSet<string> _selectedItems = []; | |
| private readonly HashSet<string> _selectedItems = []; |
Closes #9.
Fixes
Disabledparameter not working.