Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit af7bf8a

Browse files
Code formatting
1 parent 96cfac9 commit af7bf8a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎src/main/default/lwc/lookup/__tests__/lookupEventHandling.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('c-lookup event handling', () => {
100100
// Check selection
101101
expect(lookupEl.selection.length).toBe(1);
102102
expect(lookupEl.selection[0].id).toBe(SAMPLE_SEARCH_ITEMS[0].id);
103-
103+
104104
// Check if the scroll focus is functional
105105
const focusedElement = lookupEl.shadowRoot.querySelector(`[data-recordid="${SAMPLE_SEARCH_ITEMS[0].id}"]`);
106106
expect(focusedElement.scrollIntoView).toHaveBeenCalled();

‎src/main/default/lwc/lookup/lookup.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,11 @@ export default class Lookup extends NavigationMixin(LightningElement) {
260260
}
261261

262262
if (event.keyCode === KEY_ARROW_DOWN || event.keyCode === KEY_ARROW_UP) {
263-
const focusedElement = this.template.querySelector(`[data-recordid="${this._searchResults[this._focusedResultIndex].id}"]`);
263+
const focusedElement = this.template.querySelector(
264+
`[data-recordid="${this._searchResults[this._focusedResultIndex].id}"]`
265+
);
264266
if (focusedElement) {
265-
focusedElement.scrollIntoView({ block: 'nearest', inline:'nearest' })
267+
focusedElement.scrollIntoView({ block: 'nearest', inline:'nearest' });
266268
}
267269
}
268270
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /