git commit del pull

This commit is contained in:
Алекс 2026-02-03 20:08:42 +01:00
parent c5aab5e1fc
commit 4b4ec43f9d
1 changed files with 3 additions and 2 deletions

View File

@ -193,8 +193,9 @@ export function renderFacturasPage() {
// Debounce para no hacer muchas llamadas // Debounce para no hacer muchas llamadas
clearTimeout(searchInput.debounceTimer); clearTimeout(searchInput.debounceTimer);
searchInput.debounceTimer = setTimeout(() => { searchInput.debounceTimer = setTimeout(() => {
// Validación mínima: al menos 2 caracteres para activar búsqueda // Solo aplicar búsqueda si contiene al menos un número
if (inputValue.length >= 2) { const hasNumber = /\d/.test(inputValue);
if (hasNumber) {
searchTerm = inputValue; searchTerm = inputValue;
} else { } else {
searchTerm = ''; // Si es muy corto, mostrar todas searchTerm = ''; // Si es muy corto, mostrar todas