Chat: selectedIndexChange emits a number but onTabChange reads event.index #1019

Closed
opened 2026-08-12 08:11:39 +00:00 by spikerj · 1 comment
Owner

Summary

The chat template binds (selectedIndexChange) which emits a bare number, but onTabChange treats the argument like a MatTabChangeEvent and reads event.index. That clears/wipes selectedTabIndex and breaks history auto-load driven from the template binding.

Found by

Wave 6 coverage tick 9 a7 (bae903f1).

Expected

Either bind (selectedTabChange) and use event.index, or change onTabChange to accept number directly.

## Summary The chat template binds `(selectedIndexChange)` which emits a bare `number`, but `onTabChange` treats the argument like a MatTabChangeEvent and reads `event.index`. That clears/wipes `selectedTabIndex` and breaks history auto-load driven from the template binding. ## Found by Wave 6 coverage tick 9 a7 (`bae903f1`). ## Expected Either bind `(selectedTabChange)` and use `event.index`, or change `onTabChange` to accept `number` directly.
Author
Owner

Already present on spikersoft-angular master. onTabChange takes a number (matching selectedIndexChange), not event.index. Closing.

Already present on `spikersoft-angular` `master`. `onTabChange` takes a `number` (matching `selectedIndexChange`), not `event.index`. Closing.
Sign in to join this conversation.