Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@featherds/autocomplete

Package Overview
Dependencies
Maintainers
4
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@featherds/autocomplete - npm Package Compare versions

Comparing version 0.12.16 to 0.12.17

20

package.json
{
"name": "@featherds/autocomplete",
"version": "0.12.16",
"version": "0.12.17",
"publishConfig": {

@@ -14,10 +14,10 @@ "access": "public"

"dependencies": {
"@featherds/chips": "^0.12.16",
"@featherds/composables": "^0.12.16",
"@featherds/icon": "^0.12.16",
"@featherds/input-helper": "^0.12.16",
"@featherds/list": "^0.12.16",
"@featherds/menu": "^0.12.16",
"@featherds/styles": "^0.12.16",
"@featherds/utils": "^0.12.16",
"@featherds/chips": "^0.12.17",
"@featherds/composables": "^0.12.17",
"@featherds/icon": "^0.12.17",
"@featherds/input-helper": "^0.12.17",
"@featherds/list": "^0.12.17",
"@featherds/menu": "^0.12.17",
"@featherds/styles": "^0.12.17",
"@featherds/utils": "^0.12.17",
"vue": "^3.1.0-0"

@@ -30,3 +30,3 @@ },

"types": "./src/index.d.ts",
"gitHead": "9e47b2cea0394edefb66b61103b83c6394270a4f"
"gitHead": "5671341daf41160b80b4a54dc4162c17342bc8c8"
}

@@ -896,2 +896,32 @@ import FeatherAutocomplete from "./FeatherAutocomplete.vue";

});
it("should fire single update:modelValue when clicked", async () => {
const results = getResults();
const wrapper = getFullWrapper();
await wrapper
.find<HTMLInputElement>(".feather-autocomplete-input")
.trigger("focus");
await wrapper.setProps({
results,
});
// search
const query = "item";
wrapper.vm.query = query;
// click the 2nd result
await wrapper
.findComponent({ ref: "results" })
.findAll(".result-item")[1]
.trigger("click");
await wrapper.find(".feather-autocomplete-input").trigger("blur");
await wrapper.vm.$nextTick();
const events = getCalls<[IAutocompleteItemType[]]>(
wrapper,
"update:modelValue"
);
expect(events.length).toBe(1);
});
it("should display the current selected value if no new selection is made", async () => {

@@ -898,0 +928,0 @@ vi.useFakeTimers({

@@ -106,3 +106,8 @@ import { Ref } from "vue";

},
handleInputBlur() {
handleInputBlur(e: FocusEvent) {
const userClickedLI = !!(
e.relatedTarget &&
(e.relatedTarget as HTMLElement).classList.contains("feather-list-item")
);
//select active index

@@ -113,2 +118,5 @@ if (resultsRender.active.row > -1) {

emit("new", item._new as string);
} else if (type === "single" && userClickedLI) {
// user clicked with mouse; prevent selection on blur
e.preventDefault();
} else {

@@ -115,0 +123,0 @@ emit("update:modelValue", item);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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