fix: Unable to edit collection description

closes #1523
This commit is contained in:
Tom Moor
2020-09-09 23:23:01 -07:00
parent cc8db7e991
commit 9c9b95741c

View File

@@ -20,20 +20,12 @@ type Props = {
@observer
class CollectionEdit extends React.Component<Props> {
@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();