-
Notifications
You must be signed in to change notification settings - Fork 5
Autocomplete dropdown width calculates on search #2
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 13 13
Lines 612 613 +1
Branches 107 107
=====================================
+ Hits 612 613 +1
Continue to review full report at Codecov.
|
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.
Looks good to me 👍
}); | ||
merge( | ||
Observable.fromEvent(this.windowRef.getWindow(), 'resize'), | ||
Observable.fromEvent(elementRef.nativeElement.querySelector('input[skyAutocomplete], textarea[skyAutocomplete]'), '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.
Looking at this from the context of the autocomplete component, resizing the dropdown when the input is focused seems odd ("Why do I need to resize the dropdown when the input is focused?"). I know it works for the specific use case in the vertical tabs/modal component, but is there a way to repaint the dropdown that's more obvious from the autocomplete's perspective?
Is the issue related to how vertical tabs paints its hidden panels?
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.
The dropdown only gets redrawn once on ViewInit, and then any time a window is resized, or a user focuses on the input. After conversation, we've decided to call redraw every time a search is made. Change incoming.
@Blackbaud-AlexKingman Also, whichever strategy you decide to go with will need a unit test. |
Addresses blackbaud/skyux2#2029