mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
🐛 **Problem**: Refactoring broke search - showing 'No results' for valid queries 🔧 **Root Cause**: Replaced working on:input handler with reactive statement ⚡ **Solution**: Restored on:input={handleInput} approach **Why the reactive statement failed:** - `$: performSearch(searchQuery)` runs before history prop is ready - Svelte reactive statements execute immediately on component init - History prop from parent may not be available yet, causing search to fail **Why on:input works better:** ✅ Explicit user-triggered execution (only when typing) ✅ Ensures history prop is available when search runs ✅ Cleaner separation of concerns (input vs reactive computations) ✅ Matches existing OpenWebUI patterns **Functionality restored:** - Real-time search through chat messages ✅ - Accurate result counting ✅ - Case-insensitive matching ✅ - Navigation between results ✅ The search now works exactly as it did before the refactoring attempt. |
||
---|---|---|
.. | ||
lib | ||
routes | ||
app.css | ||
app.d.ts | ||
app.html | ||
tailwind.css |