From b71dfaaa7ef723872f543c21dd132e5d80570d78 Mon Sep 17 00:00:00 2001 From: Marc Vilella Date: Tue, 23 Apr 2019 13:30:22 +0200 Subject: [PATCH 1/2] Add dropdown functionality when hover or focus I don't understand the functionality of the .on-focus class. While the docs say 'You may add the is-focused class to form-autocomplete-input to make it appear as focus state' it actually only manages shadow and border color. I added an .autocomplete-dropdown class that hides the menu and shows it on hover or on focus. There is also a translate reset to prevent .menu hiding when mouse hovers the gap between .form-autocmplete-input and .menu --- src/_autocomplete.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/_autocomplete.scss b/src/_autocomplete.scss index 279fa036a..8474872a0 100644 --- a/src/_autocomplete.scss +++ b/src/_autocomplete.scss @@ -44,4 +44,15 @@ flex: 1 0 auto; } } + + &.autocomplete-unfold { + .menu { + display: none; + transform: translateY(0); + } + + &:hover > .menu, + &:focus-within > .menu { display: block; } + + } } From 7b9fd2b3a9c2637bc8afc83973e558c312332c7a Mon Sep 17 00:00:00 2001 From: Marc Vilella Date: Tue, 23 Apr 2019 13:35:13 +0200 Subject: [PATCH 2/2] Prevent chips growing when oneline Chips keep their size and don't grow when autocomplete is set to oneline --- src/_autocomplete.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_autocomplete.scss b/src/_autocomplete.scss index 8474872a0..af4011152 100644 --- a/src/_autocomplete.scss +++ b/src/_autocomplete.scss @@ -41,7 +41,7 @@ } .chip { - flex: 1 0 auto; + flex: 0 0 auto; } }