eui
eui copied to clipboard
[EuiInMemoryTable] Issue with sorting
I found an issue with the sorting behaviour of the InMemoryTable.
It does not update the prevProps object on the state (getDerivedStateFromProps()) whenever the sorting prop changes (here https://github.com/elastic/eui/blob/main/src/components/basic_table/in_memory_table.tsx#L320)
Because of that, the if condition is always evaluated against the first value passed as prop (e.g. { sortName: 'foo', sortDirection: 'desc' }) and that column can't toggle the sort direction.
@chandlerprall Do you have an update when you could have a look into this? cheers 👍
I can start digging into this on Friday