I've configured a grid component in Magento — and the sorting behavior seems broken. Where can I debug this on the javascript level, and/or does anyone else have any idea why this might be happening?
If I sort the grid once, an ajax request is made, and everything sorts correctly.
However, the second sort, without an ajax request, renders the grid with all the same IDs.
The behavior is not repeated on Magento core grids, so I'm pretty sure this is something I'm doing. I just don't know the ui component system well enough to know where to start debugging this.
Best Answer
Alright, I can't pretend to understand why yet, but the problem was the
data
argument of mydataProvider
argument.When I compared this to a few of the core grids, the
data
argument was missing astorageConfig
node, with anindexField
sub-node with the primary key of my model.When I added these nodes, sorting functionality was restored.