ui5-webcomponents-react icon indicating copy to clipboard operation
ui5-webcomponents-react copied to clipboard

[SAP][Analytical Table] onSelectionChange gives wrong data

Open thisisjasmeet opened this issue 3 years ago • 9 comments

!! It is needed for Internal SAP consumption !!

image

Describe the bug onSelectionChange event has property selectedFlatRows

on checking for a parent node which has some unselected items isSomeSelected is coming as false.

Expected behavior it should be true.

UI5 Web Components for React Information @ui5/webcomponents-react version: v 1.0.1 Operating System: macos Browser: chrome

It is needed for Internal SAP consumption

thisisjasmeet avatar Oct 04 '22 11:10 thisisjasmeet

Hey @Lukas742. Can you please assign me the issue?

rit-clone avatar Oct 09 '22 11:10 rit-clone

Hi @rit-clone

sure :) Thanks a lot for your support!

Lukas742 avatar Oct 10 '22 06:10 Lukas742

@thisisjasmeet I am unable to recreate this bug in my system. Can you please elaborate on what it is that's not working and how to get to the bugged state?

rit-clone avatar Oct 10 '22 11:10 rit-clone

Hi @thisisjasmeet

could you please add a reproducible example, preferably by using this codeSandbox template?

Lukas742 avatar Oct 11 '22 09:10 Lukas742

Hi @thisisjasmeet

could you please add a reproducible example, preferably by using this codeSandbox template?

https://codesandbox.io/s/treetable-forked-sc3u19?file=/src/App.js

image

thisisjasmeet avatar Oct 12 '22 04:10 thisisjasmeet

@Lukas742 @rit-clone by when we can have fix for this.

This is a critical thing that needs to be fixed.

Thanks in advance :)

thisisjasmeet avatar Oct 17 '22 06:10 thisisjasmeet

Hi @rit-clone

are you still looking into this issue and do you have a broad estimate for the fix? If your schedule is full and you can’t find the time to work on it, that’s no problem at all, just please let us know so we can take over. Thanks again :)

Lukas742 avatar Oct 19 '22 10:10 Lukas742

Hi @Lukas742 sorry for taking your time. This issue is quite tricky and I have prior deadlines from my organization. Can you please assign this to someone else?

rit-clone avatar Oct 19 '22 12:10 rit-clone

@rit-clone no problem and thanks for the response.

Lukas742 avatar Oct 19 '22 13:10 Lukas742

:tada: This issue has been resolved in version v1.2.1 :tada:

The release is available on v1.2.1

Your semantic-release bot :package::rocket:

@Lukas742 The issue is still occuring https://codesandbox.io/s/treetable-forked-sc3u19?file=/src/App.js

https://user-images.githubusercontent.com/57886348/197930025-6abf6ede-ad21-4a7e-b1d4-269b583185c3.mp4

thisisjasmeet avatar Oct 26 '22 03:10 thisisjasmeet

Hi @thisisjasmeet

I realized just now what the actual issue is. At first I thought this was connected to the selectedFlatRows issue, but as it turns out this is an issue with the useIndeterminateRowSelect hook. As this is more complex it will unfortunately take some time to resolve this.

Lukas742 avatar Oct 27 '22 13:10 Lukas742

Hi @thisisjasmeet

unfortunately it's not practical for us changing isSomeSelected to show the desired value. The property is coming from the underlying library we use to construct our table and the value is not changed to true because the row is still selected and only isSelected or isSomeSelected can be true at the same time.

When the second linked PR is merged, the plugin hook will allow passing a callback as parameter which is fired every time the internal indeterminate state is changed. Then you will be able to get all indeterminate rows via the event param.

Lukas742 avatar Nov 23 '22 12:11 Lukas742

:tada: This issue has been resolved in version v1.6.0 :tada:

The release is available on v1.6.0

Your semantic-release bot :package::rocket: