We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a88529b commit 337f129Copy full SHA for 337f129
src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.js
@@ -153,9 +153,16 @@ const handlerKeydown = (ac, e) => {
153
if (key === 'Enter') {
154
const skipEnter = el.getAttribute('data-bb-skip-enter') === 'true';
155
if (!skipEnter) {
156
- const current = menu.querySelector('.active');
157
- if (current !== null) {
158
- current.click();
+ const items = [...menu.querySelectorAll('.dropdown-item')];
+ if (items.length === 1) {
+ const item = items[0];
159
+ item.click();
160
+ }
161
+ else {
162
+ const current = menu.querySelector('.active');
163
+ if (current !== null) {
164
+ current.click();
165
166
}
167
invoke.invokeMethodAsync('EnterCallback');
168
0 commit comments