Bugfix: useCrudList stub's requestDelete() calls deleteFn(id) with a...
Documentation for Sessions
🐛 Bugfix: useCrudList stub's requestDelete() calls deleteFn(id) with a...
Date: 2026-03-23
Time: 13:53:15 UTC
Session: gspace1-251.6
Agent: angular
Confidence: 99%
Status: ✅ Documented
📋 Decision Context
Question:
useCrudList stub's requestDelete() calls deleteFn(id) with a single string, but the real useCrudList API and all generated code expect deleteFn(ids: string[]) — an array. Causes TypeError: Cannot read properties of undefined (reading 'map').
Task: Not specified
🎯 Decision Made
Chosen:
Changed stub to call config.deleteFn([id]) wrapping single ID in array. Also fixed requestBulkDelete to pass full IDs array directly to deleteFn instead of calling per-item.
Options Considered:
- Change generated code to accept single ID
- Change stub to pass array (chosen — matches real API)
💭 Reasoning
The real useCrudList in libs/core/module-base/src/lib/crud/composables/use-crud-list.ts defines deleteFn?: (ids: string[]) => Observable
📁 Files Involved
libs/libs-structural/platform-preview/src/lib/config/sdk-preview-stubs.tslibs/core/module-base/src/lib/crud/composables/use-crud-list.ts
🔗 Related
- Decision ID:
dev_1774273994975_bl5j5mp - Session: 251
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation