summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/Searchable.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/Searchable.qml b/components/Searchable.qml
index 9501827..50e73fe 100644
--- a/components/Searchable.qml
+++ b/components/Searchable.qml
@@ -12,7 +12,8 @@ Singleton {
enum SearchAlgorithm {
Levendist,
Fzf,
- Fuzzysort
+ Fuzzysort,
+ Include
}
property int algorithm: Searchable.SearchAlgorithm.Levendist
property int scoreThreshold: 50
@@ -224,6 +225,9 @@ Singleton {
return out;
}
+ if (algorithm === Searchable.SearchAlgorithm.Include)
+ return list.filter(item => keys.some(k => transformSearch(fieldString(item, k)).includes(search)));
+
return [];
}
}