feat(module:transfer): support multiple row selection with Shift key#9092
Merged
Conversation
|
This preview will be available after the AzureCI is passed. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9092 +/- ##
==========================================
- Coverage 92.01% 91.99% -0.02%
==========================================
Files 564 564
Lines 20025 20047 +22
Branches 3106 3113 +7
==========================================
+ Hits 18426 18443 +17
- Misses 1261 1265 +4
- Partials 338 339 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a feature that enables multiple row selection via the Shift key in the transfer component. Key changes include:
- Addition of a new test verifying multi-select behavior when holding the Shift key.
- Integration of HostListener decorators to track Shift key state and update selection logic in the transfer component.
- Minor formatting improvements in test and component code for consistency.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| components/transfer/transfer.spec.ts | Added test case for Shift key multi-selection and updated test configuration formatting |
| components/transfer/transfer.component.ts | Integrated Shift key event handling via HostListeners and updated selection logic using dynamic indexing |
Comments suppressed due to low confidence (2)
components/transfer/transfer.spec.ts:211
- [nitpick] Consider renaming the test description to 'should toggle checkbox selection via shift key' for improved clarity.
it('should be checkboxes are toggle select via shift key', () => {
components/transfer/transfer.component.ts:278
- [nitpick] Consider assigning the property key to a separate variable (e.g. 'const lastIndexKey = direction === 'left' ? 'lastLeftCheckedIndex' : 'lastRightCheckedIndex';') to improve readability.
const lastCheckedIndex = this[direction === 'left' ? 'lastLeftCheckedIndex' : 'lastRightCheckedIndex'] ?? -1;
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.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
It is not possible to select multiple row by using keyboard key SHIFT
Issue Number: N/A
What is the new behavior?
The new behavior allow to select multiple row by using the keyboard key SHIFT
Does this PR introduce a breaking change?
Other information
ANT DESIGN support this feature in their React component: https://ant.design/components/transfer