Investigate the sorting state persistence in ui grid. Look at the sort feature code (likely in src/features/sort) and the state service that manages grid state. The bug suggests that the first sort change does not trigger a state save, possibly due to an initialization issue or missed broadcast. Check the grid's state saving logic and ensure that the sorting change event is properly captured on the first occurrence.
Sorting is not saved in state first time · angular-ui/ui-grid#4187 | Good First Issue