From 226081db3a54a8b87d5c61a336d1547540abf608 Mon Sep 17 00:00:00 2001 From: Dark_Phoenix_ <92178883+0DarkPhoenix@users.noreply.github.com> Date: Wed, 28 May 2025 18:57:33 +0200 Subject: [PATCH] Improved iso 3166 searcher page performance (#79) * Improved performance on the Unicode Search page: - Created new flexSearch component (Faster than fuzzySearch). For more information, see https://github.com/nextapps-de/flexsearch - Replaced fuzzySearch with the flexSearch component on the unicode search page - Fixed a bug where the search limit counter didn't have any effect - Reduced the default search limit from 100 to 40 to reduce lag from loading all the ui elements * Added clarification to comment * components.d.ts update * - Replaced FuzzySearch with FlexSearch on the ISO 3166 Searcher page - Reduced the debounce from 500ms to 250ms - Reduced the default search limit from 100 to 20, and fixed a bug where the search limit wasn't applied when the value changed - Added the `readonly` prop to the `input-copyable` field - Added the `readonly` flag to all input copyable fields on the unicode search and iso 3166 searcher pages * Fixed incorrect case usage for functions and variables --- src/components/InputCopyable.vue | 2 + src/composable/flexSearch.ts | 122 +++++++----- .../iso-3166-searcher/iso-3166-searcher.vue | 178 +++++++++++++----- src/tools/unicode-search/unicode-search.vue | 14 +- 4 files changed, 213 insertions(+), 103 deletions(-) diff --git a/src/components/InputCopyable.vue b/src/components/InputCopyable.vue index d4d650c9..3d847960 100644 --- a/src/components/InputCopyable.vue +++ b/src/components/InputCopyable.vue @@ -7,6 +7,7 @@ const props = defineProps<{ multiline?: boolean rows?: number | string autosize?: boolean + readonly?: boolean }>(); const emit = defineEmits(['update:value']); @@ -21,6 +22,7 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : 'Copy to cli :multiline="multiline" :rows="rows" :autosize="autosize" + :readonly="readonly" >