microsoft / iot-cardboard-js

iot-cardboard-js is a React library for building experiences for IoT applications
https://main--601c6b2fcd385c002100f14c.chromatic.com/
MIT License
83 stars 26 forks source link

Elements list is not sorted consistently on elements tab of behavior form #558

Open msnyder-msft opened 2 years ago

msnyder-msft commented 2 years ago

Describe the bug Sometimes when navigating to the elements list on the behavior form, the selected items are grouped together. Othertimes they are not grouped.

To Reproduce Steps to reproduce the behavior:

  1. Go to the "Demo environments" story
  2. Open "Eco Lab Water Plant"
  3. Click on Behaviors tab
  4. Click on Tank levels behavior
  5. See the selected elements are NOT grouped together
  6. Click Cancel
  7. Click the "Tank levels" behavior again
  8. See the selected elements ARE grouped together

Expected behavior The sorting and grouping should be consistent when navigating to and from the same behavior.

Screenshots First load image

Second load image

msnyder-msft commented 2 years ago

I'm also seeing some weird behavior here when you switch scenes a few times and then come back to the Behavior form. The list showed me elements for a different behavior/scene entirely until I switched tabs and came back, then the list had the right items and was sorted properly.