Implement expand/collapse and reopen