mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
hotfix(remission-list-item, remission-list-empty-state): improve empty state logic and cleanup selected items on destroy Refactor empty state display conditions in remission-list-empty-state component to correctly handle search term validation. Move hasValidSearchTerm check to parent condition to prevent displaying empty states during active searches. Add ngOnDestroy lifecycle hook to remission-list-item component to properly clean up selected quantities from the store when items are removed from the list. This prevents memory leaks and ensures the store state remains synchronized with the displayed items. Changes: - Move hasValidSearchTerm check in displayEmptyState computed signal to improve empty state display logic - Implement OnDestroy interface in RemissionListItemComponent - Add removeItem call in ngOnDestroy to clean up store state - Add corresponding unit tests for the cleanup behavior Ref: #5387