Socket
Socket
Sign inDemoInstall

@github/auto-complete-element

Package Overview
Dependencies
Maintainers
20
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/auto-complete-element - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

13

dist/autocomplete.js

@@ -10,3 +10,5 @@ import Combobox from '@github/combobox-nav';

this.results = results;
this.combobox = new Combobox(input, results);
this.combobox = new Combobox(input, results, {
defaultFirstOption: autoselectEnabled,
});
this.feedback = container.getRootNode().getElementById(`${this.results.id}-feedback`);

@@ -71,10 +73,2 @@ this.autoselectEnabled = autoselectEnabled;

onKeydown(event) {
if (event.key === 'Enter' && this.container.open && this.autoselectEnabled) {
const firstOption = this.results.children[0];
if (firstOption) {
event.stopPropagation();
event.preventDefault();
this.onCommit({ target: firstOption });
}
}
if (event.key === 'Escape' && this.container.open) {

@@ -164,2 +158,3 @@ this.container.open = false;

this.identifyOptions();
this.combobox.indicateDefaultOption();
const allNewOptions = this.results.querySelectorAll('[role="option"]');

@@ -166,0 +161,0 @@ const hasResults = !!allNewOptions.length;

@@ -217,3 +217,5 @@ var __defProp = Object.defineProperty;

this.results = results;
this.combobox = new Combobox(input, results);
this.combobox = new Combobox(input, results, {
defaultFirstOption: autoselectEnabled
});
this.feedback = container.getRootNode().getElementById(`${this.results.id}-feedback`);

@@ -278,10 +280,2 @@ this.autoselectEnabled = autoselectEnabled;

onKeydown(event) {
if (event.key === "Enter" && this.container.open && this.autoselectEnabled) {
const firstOption = this.results.children[0];
if (firstOption) {
event.stopPropagation();
event.preventDefault();
this.onCommit({ target: firstOption });
}
}
if (event.key === "Escape" && this.container.open) {

@@ -367,2 +361,3 @@ this.container.open = false;

this.identifyOptions();
this.combobox.indicateDefaultOption();
const allNewOptions = this.results.querySelectorAll('[role="option"]');

@@ -369,0 +364,0 @@ const hasResults = !!allNewOptions.length;

{
"name": "@github/auto-complete-element",
"version": "3.5.0",
"version": "3.5.1",
"description": "Auto-complete input values from server results",

@@ -5,0 +5,0 @@ "repository": "github/auto-complete-element",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc