Commit f7538f47 authored by Patrik Meijer's avatar Patrik Meijer
Browse files

Do not modify state in AttributeEditor and fix key warn

parent 1a6fb44c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -66,8 +66,8 @@ export default class AttributeEditor extends Component {
    handleEvents = (hash, loads, updates, unloads) => {
        // TODO update to handle multiple objects as well
        const {selection, gmeClient} = this.props;
        let {attributes} = this.state;
        const {loadedNodes} = this.state;
        const loadedNodes = [];
        let attributes = [];

        selection.forEach((nodeId) => {
            if (loads.indexOf(nodeId) !== -1 || updates.indexOf(nodeId) !== -1) {
+6 −2
Original line number Diff line number Diff line
@@ -51,9 +51,13 @@ export default class ProjectSeedCards extends Component {

            if (infoUrl) {
                const infoBtn = (
                    <a href={infoUrl} target="_blank" rel="noopener noreferrer" style={{textDecoration: 'none'}}>
                        <Button
                    <a href={infoUrl}
                       target="_blank"
                       rel="noopener noreferrer"
                       key="infoBtn"
                       style={{textDecoration: 'none'}}
                    >
                        <Button
                            size="small"
                            color="primary"
                        >