diff --git a/website/src/components/Playground/EditValue.js b/website/src/components/Playground/EditValue.js index 5222449d..a49c72b3 100644 --- a/website/src/components/Playground/EditValue.js +++ b/website/src/components/Playground/EditValue.js @@ -35,6 +35,8 @@ export default (props: Props<*>) => { type="text" {...props} onChange={e => props.onChange(props.property, e.target.value)} + placeholder="undefined" + value={Number.isNaN(props.value) ? '' : props.value} /> ); } diff --git a/website/src/components/Playground/index.js b/website/src/components/Playground/index.js index 1774f3e4..6f11b61b 100644 --- a/website/src/components/Playground/index.js +++ b/website/src/components/Playground/index.js @@ -149,11 +149,7 @@ export default class Playground extends Component { const updatedChildren = layoutDefinition .getIn(path) .push(LayoutRecord({width: 100, height: 100})); - this.modifyAtPath( - path, - updatedChildren, - selectedNodePath.concat(updatedChildren.size - 1), - ); + this.modifyAtPath(path, updatedChildren); } };