Team-TAU / tau

TAU- Twitch API Unifier, a containerized relay/proxy to unify the WebHook- and WebSocket-based real-time Twitch APIs under a single (local) WebSocket connection.
MIT License
153 stars 39 forks source link

[BUG] Streamers List does not handle new items being added to the list correctly #99

Open Brocco opened 2 years ago

Brocco commented 2 years ago

Describe the bug When replaying an event in the dashboard/streamers route, the replayed event is added to the top of the list as it is now the most recent event. If you have an item below expanded, when the list is populated with the new event the item that is expanded is a different item.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'dashboard/streamers'
  2. Click on 'an event under Websocket Stream to expand it'
  3. Click the 'Replay' button
  4. When the list is refreshed notice that a different item in the list is expanded.

Expected behavior The item that was expanded remains in the expanded state

Screenshots N/A

Deployment: Deployment is via railway. The version is the latest version on main as of Apr 27, 2022.

Additional context Nope

Brocco commented 2 years ago

Theory: Without looking at the code, it appears that the items that are expanded are being tracked based upon an index in an array, and when there is a new item added to the start of the array it now points at the wrong item in the array.

ched-dev commented 2 years ago

I did a little digging and this issue is due to a bug in the PrimeVUE Accordion component when you use :multiple="true" with dynamic tabs. I have opened a bug report with them to fix: https://github.com/primefaces/primevue/issues/2524

Only way for you to fix it for time being would be to manually override with @click actions and manage the active indexes by yourself.