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

Passing getSelectedRowIds withn object without an index key throws error

Open stevetsanders opened this issue 6 years ago • 2 comments

Describe the bug When using an AnalyticalTable and passing in something for the getSelectedRowIds prop with an object without an index as key, we receive an error. This does not cause a problem if the keys of the objects in the array are indexe.

To reproduce Steps to reproduce the behavior:

  1. Create an AnalyticalTable
  2. Pass in this prop

selectedRowIds={{ ["test"]: true }} 3. error is thrown

Isolated example https://codesandbox.io/s/wispy-dew-qlcu7

Expected behavior I would expect this to not throw an error. especially if you pass in a custom getRowId method to reactTableOptions. The keys of the object in selectedRowIds are not always an index because of this, it might be a custom string.

Screenshots If applicable, add screenshots to help explain your problem.

Context "@ui5/webcomponents": "1.0.0-rc.7", "@ui5/webcomponents-fiori": "1.0.0-rc.7", "@ui5/webcomponents-react": "0.10.0-rc.9", "react": "16.13.1",

Affected components (if known)

Log output / Any errors in the console

{...}

stevetsanders avatar Jul 20 '20 18:07 stevetsanders

Hello @stsander07

As much as I can see, the issue is regarding the AnalyticalTable, which is part of the UI5 Web Components for React.

I think that @MarcusNotheis can help out on this issue.

fifoosid avatar Jul 21 '20 09:07 fifoosid

My bad, I intended to create this in the React repo as I had already talked to Marcus about it. Anyway, I already received a response so I can close this issue

stevetsanders avatar Jul 21 '20 16:07 stevetsanders