diff --git a/app/scenes/CollectionEdit.js b/app/scenes/CollectionEdit.js index f44e739ee..7016d3f41 100644 --- a/app/scenes/CollectionEdit.js +++ b/app/scenes/CollectionEdit.js @@ -20,20 +20,12 @@ type Props = { @observer class CollectionEdit extends React.Component { - @observable name: string; - @observable description: string = ""; - @observable icon: string = ""; - @observable color: string = "#4E5C6E"; + @observable name: string = this.props.collection.name; + @observable description: string = this.props.collection.description; + @observable icon: string = this.props.collection.icon; + @observable color: string = this.props.collection.color || "#4E5C6E"; + @observable private: boolean = this.props.collection.private; @observable isSaving: boolean; - @observable private: boolean = false; - - componentDidMount() { - this.name = this.props.collection.name; - this.description = this.props.collection.description; - this.icon = this.props.collection.icon; - this.color = this.props.collection.color; - this.private = this.props.collection.private; - } handleSubmit = async (ev: SyntheticEvent<*>) => { ev.preventDefault();