Fuse.js Integration for Indexed Real-Time Searching & Dependencies added

This commit is contained in:
Ryan
2025-04-12 12:46:28 -04:00
committed by GitHub
parent 28ac23c2f6
commit d9f69d7917
5 changed files with 71 additions and 22 deletions

View File

@@ -1,5 +1,16 @@
# Changelog
## Changes 4/12/2025
- **Fuse.js Integration for Indexed Real-Time Searching**
- **Added Fuse.js Library:** Included Fuse.js via a CDN `<script>` tag to leverage its clientside fuzzy search capabilities.
- **Created searchFiles Helper Function:** Introduced a new function that uses Fuse.js to build an index and perform fuzzy searches over file properties (file name, uploader, and nested tag names).
- **Transformed JSON Object to Array:** Updated the loadFileList() function to convert the returned file data into an array (if it isnt already) and assign file names from JSON keys.
- **Updated Rendering Functions:** Modified both renderFileTable() and renderGalleryView() to use the searchFiles() helper instead of a simple inarray .filter(). This ensures that every search—realtime by user input—is powered by Fuse.jss indexed search.
- **Enhanced Search Configuration:** Configured Fuse.js to search across multiple keys (file name, uploader, and tags) so that users can find files based on any of these properties.
---
## Changes 4/11/2025
- Fixed fileDragDrop issue from previous update.