Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: do not show collapse not on root elements (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
tilmx authored and marionebl committed Jun 5, 2018
1 parent a28d3e7 commit 77dc379
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/container/element-list/element-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ElementContentContainer } from './element-content-container';
import * as MobxReact from 'mobx-react';
import * as Model from '../../model';
import * as React from 'react';
import { ElementRole } from '../../model/types';
import { ViewStore } from '../../store';

export interface ElementContainerProps {
Expand All @@ -30,7 +31,9 @@ export class ElementContainer extends React.Component<ElementContainerProps> {
draggable={true}
dragging={store.getDragging()}
id={props.element.getId()}
mayOpen={props.element.acceptsChildren()}
mayOpen={
props.element.acceptsChildren() && props.element.getRole() !== ElementRole.Root
}
open={open}
onChange={AlvaUtil.noop}
placeholderHighlighted={props.element.getPlaceholderHighlighted()}
Expand Down

0 comments on commit 77dc379

Please sign in to comment.