diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-12-17 08:36:36 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-04-13 10:05:55 +0200 |
commit | 93eb584199714883cdb75d5db77fc07bb06e56a3 (patch) | |
tree | bc1e20e89357911b3c1cf992528f15a067845d39 /core/src/services/UnifiedSearchService.js | |
parent | de7280114a501eb8568cf4c0a1c85d5561f76648 (diff) | |
download | nextcloud-server-93eb584199714883cdb75d5db77fc07bb06e56a3.tar.gz nextcloud-server-93eb584199714883cdb75d5db77fc07bb06e56a3.zip |
Make typeahead and search limit/length configurable
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/src/services/UnifiedSearchService.js')
-rw-r--r-- | core/src/services/UnifiedSearchService.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/services/UnifiedSearchService.js b/core/src/services/UnifiedSearchService.js index 85526adffa2..9d0bf84d58f 100644 --- a/core/src/services/UnifiedSearchService.js +++ b/core/src/services/UnifiedSearchService.js @@ -28,7 +28,9 @@ import { loadState } from '@nextcloud/initial-state' import axios from '@nextcloud/axios' export const defaultLimit = loadState('unified-search', 'limit-default') -export const minSearchLength = 2 +export const minSearchLength = loadState('unified-search', 'min-search-length', 2) +export const enableLiveSearch = loadState('unified-search', 'live-search', true) + export const regexFilterIn = /[^-]in:([a-z_-]+)/ig export const regexFilterNot = /-in:([a-z_-]+)/ig |