We've made changes to prevent sortChanged() from firing in these circumstances (at initialization, via sortField/sortState/initialSort).
However, note that the examples you provided are invalid:
1) a ListGrid will not produce state that has a sort fieldName but not a sortDir (although this may have been conceivable in the past) - if you manually construct such state, the grid will assume the default sortDirection. Note that the fieldName/sortDir aspects of sort-state are legacy attributes - you should use sortSpecifiers for better control.
2) a ListGrid will not (in recent versions) produce state like "sort: {}" - if you manually provide such invalid state, the grid will clear it's sort-specification, potentially unsort()ing the data.
However, note that the examples you provided are invalid:
1) a ListGrid will not produce state that has a sort fieldName but not a sortDir (although this may have been conceivable in the past) - if you manually construct such state, the grid will assume the default sortDirection. Note that the fieldName/sortDir aspects of sort-state are legacy attributes - you should use sortSpecifiers for better control.
2) a ListGrid will not (in recent versions) produce state like "sort: {}" - if you manually provide such invalid state, the grid will clear it's sort-specification, potentially unsort()ing the data.
Comment