git commit del pull
This commit is contained in:
parent
c5aab5e1fc
commit
4b4ec43f9d
|
|
@ -193,8 +193,9 @@ export function renderFacturasPage() {
|
|||
// Debounce para no hacer muchas llamadas
|
||||
clearTimeout(searchInput.debounceTimer);
|
||||
searchInput.debounceTimer = setTimeout(() => {
|
||||
// Validación mínima: al menos 2 caracteres para activar búsqueda
|
||||
if (inputValue.length >= 2) {
|
||||
// Solo aplicar búsqueda si contiene al menos un número
|
||||
const hasNumber = /\d/.test(inputValue);
|
||||
if (hasNumber) {
|
||||
searchTerm = inputValue;
|
||||
} else {
|
||||
searchTerm = ''; // Si es muy corto, mostrar todas
|
||||
|
|
|
|||
Loading…
Reference in New Issue