-
Notifications
You must be signed in to change notification settings - Fork 156
fix(igxHierarchicalGrid): Fix navigation with tab is not correct #4780 #6033
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
Conversation
|
This has already been fixed by PR #5900. The current fix is not taken into account because navigating using tab does not go through the igxHierarchicalGrid's navigation service, but through the regular igxGrid navigation service which means overriding the |
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.
.
| }) | ||
| export class IgxHierarchicalGridSmallerChildComponent extends IgxHierarchicalGridTestBaseComponent {} | ||
|
|
||
| @Component({ |
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.
Can you use IgxHierarchicalGridTestComplexComponent istead of creating new one
| fixture.detectChanges(); | ||
|
|
||
| const cell = hierarchicalGrid.getCellByColumn(2, 'ProductName'); | ||
| cell.nativeElement.focus(); |
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.
In order cell to be focused you have to use cell.nativeElement.dispatchEvent(new Event('focus'));
| const keyboardEvent = new KeyboardEvent('keydown', { | ||
| key: 'Tab' | ||
| }); | ||
| cell.dispatchEvent(keyboardEvent); |
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.
There is defined function for keyboard iterations:
UIInteractions.triggerKeyDownEvtUponElem('Tab', cell.nativeElement, true);
| super(); | ||
| this.data = this.generateData(20, 2); | ||
| } | ||
| generateData(count: number, level: number) { |
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.
As this method is used more than once you can define it in the sample-test-data.spec.ts. An reuse it in all the definitions.
Closes #4780
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes