|
|
@ -567,19 +567,6 @@ export default class EntityGrid extends Vue { |
|
|
}), |
|
|
}), |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
logger.debug("[EntityGrid] Project search results", { |
|
|
|
|
|
beforeId, |
|
|
|
|
|
newProjectsCount: newProjects.length, |
|
|
|
|
|
hasRowId: |
|
|
|
|
|
newProjects.length > 0 |
|
|
|
|
|
? !!newProjects[newProjects.length - 1]?.rowId |
|
|
|
|
|
: false, |
|
|
|
|
|
lastRowId: |
|
|
|
|
|
newProjects.length > 0 |
|
|
|
|
|
? newProjects[newProjects.length - 1]?.rowId |
|
|
|
|
|
: undefined, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (beforeId) { |
|
|
if (beforeId) { |
|
|
// Pagination: append new projects to existing search results |
|
|
// Pagination: append new projects to existing search results |
|
|
this.filteredEntities.push(...newProjects); |
|
|
this.filteredEntities.push(...newProjects); |
|
|
@ -594,15 +581,8 @@ export default class EntityGrid extends Vue { |
|
|
const lastProject = newProjects[newProjects.length - 1]; |
|
|
const lastProject = newProjects[newProjects.length - 1]; |
|
|
// Only set searchBeforeId if rowId exists (indicates more results available) |
|
|
// Only set searchBeforeId if rowId exists (indicates more results available) |
|
|
this.searchBeforeId = lastProject.rowId || undefined; |
|
|
this.searchBeforeId = lastProject.rowId || undefined; |
|
|
logger.debug("[EntityGrid] Updated searchBeforeId", { |
|
|
|
|
|
searchBeforeId: this.searchBeforeId, |
|
|
|
|
|
filteredEntitiesCount: this.filteredEntities.length, |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.searchBeforeId = undefined; // No more results |
|
|
this.searchBeforeId = undefined; // No more results |
|
|
logger.debug("[EntityGrid] No more search results", { |
|
|
|
|
|
filteredEntitiesCount: this.filteredEntities.length, |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
if (!beforeId) { |
|
|
if (!beforeId) { |
|
|
|