reorder rows to match the preferences when showing the option to hide rows