Adaptive response of a metal–organic framework through reversible disorder–disorder transitions