mirror of
				https://github.com/Redocly/redoc.git
				synced 2025-10-30 23:37:28 +03:00 
			
		
		
		
	Merge pull request #24 from Bandwidth/tags
Update Tag Groups to be Collapsible
This commit is contained in:
		
						commit
						4f6935bce8
					
				|  | @ -53,7 +53,7 @@ export class MenuItem extends React.Component<MenuItemProps> { | |||
|               {item.sidebarLabel} | ||||
|               {this.props.children} | ||||
|             </MenuItemTitle> | ||||
|             {(item.depth > 0 && item.items.length > 0 && ( | ||||
|             {(item.items.length > 0 && ( | ||||
|               <ShelfIcon float={'right'} direction={item.expanded ? 'down' : 'right'} /> | ||||
|             )) || | ||||
|               null} | ||||
|  |  | |||
|  | @ -56,9 +56,9 @@ export class GroupModel implements IMenuItem { | |||
|     this.parent = parent; | ||||
|     this.externalDocs = (tagOrGroup as OpenAPITag).externalDocs; | ||||
| 
 | ||||
|     // groups are active (expanded) by default
 | ||||
|     // groups are active but not expanded by default
 | ||||
|     if (this.type === 'group') { | ||||
|       this.expanded = true; | ||||
|       this.active = true; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|  | @ -77,10 +77,6 @@ export class GroupModel implements IMenuItem { | |||
| 
 | ||||
|   @action | ||||
|   collapse() { | ||||
|     // disallow collapsing groups
 | ||||
|     if (this.type === 'group') { | ||||
|       return; | ||||
|     } | ||||
|     this.expanded = false; | ||||
|   } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user