diff --git a/src/components/EntityGrid.vue b/src/components/EntityGrid.vue index dd825c5e..aa5e58f4 100644 --- a/src/components/EntityGrid.vue +++ b/src/components/EntityGrid.vue @@ -326,33 +326,6 @@ export default class EntityGrid extends Vue { @Prop({ default: "other party" }) conflictContext!: string; - /** - * Function to determine which entities to display (allows parent control) - * - * This function prop allows parent components to customize which entities - * are displayed in the grid, enabling advanced filtering and sorting. - * Note: Infinite scroll is disabled when this prop is provided. - * - * @param entities - The full array of entities (Contact[] or PlanData[]) - * @param entityType - The type of entities being displayed ("people" or "projects") - * @returns Filtered/sorted array of entities to display - * - * @example - * // Custom filtering: only show contacts with profile images - * :display-entities-function="(entities, type) => - * entities.filter(e => e.profileImageUrl)" - * - * @example - * // Custom sorting: sort projects by name - * :display-entities-function="(entities, type) => - * entities.sort((a, b) => a.name.localeCompare(b.name))" - */ - @Prop({ default: null }) - displayEntitiesFunction?: ( - entities: Contact[] | PlanData[], - entityType: "people" | "projects", - ) => Contact[] | PlanData[]; - /** * CSS classes for the empty state message */ @@ -397,11 +370,6 @@ export default class EntityGrid extends Vue { return this.filteredEntities.slice(0, this.displayedCount); } - // If custom function provided, use it (disables infinite scroll) - if (this.displayEntitiesFunction) { - return this.displayEntitiesFunction(this.entitiesToUse, this.entityType); - } - // Default: projects use infinite scroll if (this.entityType === "projects") { return (this.entitiesToUse as PlanData[]).slice(0, this.displayedCount); @@ -860,11 +828,6 @@ export default class EntityGrid extends Vue { * Determine if more entities can be loaded */ canLoadMore(): boolean { - if (this.displayEntitiesFunction) { - // Custom function disables infinite scroll - return false; - } - if (this.searchTerm.trim()) { // Search mode: check if more results available if (this.entityType === "projects") { diff --git a/src/test/EntityGridFunctionPropTest.vue b/src/test/EntityGridFunctionPropTest.vue index 3b10461a..bade6dd4 100644 --- a/src/test/EntityGridFunctionPropTest.vue +++ b/src/test/EntityGridFunctionPropTest.vue @@ -2,15 +2,6 @@