From 2f7374cca992b0ed6afd1f719df94144c4076b01 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Sat, 27 Jul 2024 11:11:49 +0200 Subject: [PATCH] Use fuzzysearch to filter notes in NoteSelector --- package-lock.json | 6 +++++ package.json | 1 + src/components/NoteSelector.vue | 42 ++++++++++++++++++++++++++------- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 030fdab..e5c6e6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@sindresorhus/slugify": "^2.2.1", "electron-log": "^5.0.1", + "fuzzysort": "^3.0.2", "pinia": "^2.1.7", "semver": "^7.6.3" }, @@ -3833,6 +3834,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/fuzzysort": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-3.0.2.tgz", + "integrity": "sha512-ZyahVgxvckB1Qosn7YGWLDJJp2XlyaQ2WmZeI+d0AzW0AMqVYnz5N89G6KAKa6m/LOtv+kzJn4lhDF/yVg11Cg==" + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", diff --git a/package.json b/package.json index f75dd77..5896911 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "dependencies": { "@sindresorhus/slugify": "^2.2.1", "electron-log": "^5.0.1", + "fuzzysort": "^3.0.2", "pinia": "^2.1.7", "semver": "^7.6.3" } diff --git a/src/components/NoteSelector.vue b/src/components/NoteSelector.vue index 78f69a9..341be3d 100644 --- a/src/components/NoteSelector.vue +++ b/src/components/NoteSelector.vue @@ -1,4 +1,6 @@