Apply the selected sort mode locally as soon as the popup closes while the server persists it, and roll back the local choice if persistence fails. Use the same effective mode for paging, popup state and custom ordering, with browser coverage for visible order and stored profile state.
Thanks to jullbo and xet7 !
Fixes#6664,