ix icon indicating copy to clipboard operation
ix copied to clipboard

IxGroupItem and IxGroup do not handle "selected" attribute correctly

Open fakhir opened this issue 1 year ago • 3 comments

Prerequisites

  • [X] I have not leaked any internal company information.
  • [X] I have not posted internal links or code snippets.

What happened?

I am facing a problem similar to that reported in #747. But in my case I am not selecting multiple groups/group-items simultaneously but still the IxGroup/IxGroupItem behaves strangely and seems to have its own concept of what should be highlighted as "selected", regardless of the attribute I specify. I end up with multiple IxGroups being rendered as selected, even though the "selected=true" attribute is only specified on one of them and all others are set to "selected=false".

What type of frontend frameware are you seeing the problem on?

React

Which version of iX do you use?

v2.0.4

Code to produce this issue.

Sandbox to reproduce the problem:
https://codesandbox.io/p/sandbox/hidden-sun-q2s7kk

Follow these steps to reproduce problem in above sandbox:
- Click on group "Three"
- Click on item "Three One" so it gets selected
- Click on group "One" so it gets selected
- You will notice the problem that both groups "Three" and "One" are shown as selected even though the "selected" attribute is only specified on one group.

fakhir avatar Feb 07 '24 10:02 fakhir

ixgroup_sel

fakhir avatar Feb 07 '24 11:02 fakhir

Internal ref [IX-898]

matthiashader avatar Feb 08 '24 07:02 matthiashader

I think this one might be related: https://github.com/siemens/ix/issues/915 I ended up setting suppressHeaderSelection on the group and suppressSelection on the group item and using custom logic to decide which group item should be selected and wrote custom css to highlight the selected item.

TDaniel-evo avatar Feb 08 '24 08:02 TDaniel-evo