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
|
// 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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue