Bug: error when trying to sort table by Actions: _sortedDisplayedDataIndices: Cannot read properties of undefined (reading '1')

I have a UI with a few tables with actions.
The "Actions" column cannot disable sorting as far as I know.
When I accidentally click on the "Actions" column header, my table goes blank and is unresponsive:
Screen Shot 2022-02-11 at 6.52.08 PM

The text reads:

_sortedDisplayedDataIndices: Cannot read properties of undefined (reading '1')

Clicking on a sortable column fixes it, but if no columns are sortable the only resolution I have found is having another element set the sort programmatically. On one table I have disabled sorting on all the data columns. It's also very unintuitive what broke & how to resolve.

I have four tables on this page. Sorting by actions seems to break all of them unless there's exactly one row in them.

Extra context in case it's helpful:

  • The tables have been made since early January and have seen some schema changes, so there may be configuration in the app state for columns that no longer exist.
  • I didn't notice it until today. I've never seen this behavior before.

And this may be a separate issue, but:

  • The action buttons don't seem to be sorting when I sort by other columns. Buttons that reference currentRow data stay in the original sort order when sorting by other columns. Clicking the button then does the action for the row it's next to, since the clicking selects the row. This is pretty problematic, since the button's disabled state isn't tied to the row it will act on.
1 Like

I'm also experiencing this issue. I have several tables that had been configured to be sorted by default date in descending order. Had been working fine until yesterday. As mentioned by OP manually resorting does work as a temporary solution. However the cells in my tables are editable and is impacted by the broader issue; after manually resorting the table and editing a cell, the change is actually incorrectly applied to the cell which was originally in that position when the app loads.

+1 here. URGENT: Table on production screen not displaying - #6 by tntermini

This is now resolved, presumably with the same fix for URGENT: Table on production screen not displaying - #6 by tntermini

1 Like