mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
fix type to select bug
This commit is contained in:
@@ -9,6 +9,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
|
||||
## Next
|
||||
|
||||
- Added a console error that appears when menu items have duplicate values in `sl-select`
|
||||
- Fixed a bug in `sl-menu` where pressing <kbd>Enter</kbd> after using type to select would result in the wrong value
|
||||
|
||||
## 2.0.0-beta.47
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ export default class SlMenu extends LitElement {
|
||||
const slot = item.shadowRoot!.querySelector('slot:not([name])') as HTMLSlotElement;
|
||||
const label = getTextContent(slot).toLowerCase().trim();
|
||||
if (label.substring(0, this.typeToSelectString.length) === this.typeToSelectString) {
|
||||
this.setCurrentItem(item);
|
||||
item.focus();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user