From 3b67e57f1a7dd524fac97c000cc2685b9bbe0e72 Mon Sep 17 00:00:00 2001 From: britea Date: Tue, 21 Apr 2020 16:18:05 +0200 Subject: [PATCH] fixed edit name on devices --- .../components/dashboard/devices/DeviceSettingsModal.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/smart-hut/src/components/dashboard/devices/DeviceSettingsModal.js b/smart-hut/src/components/dashboard/devices/DeviceSettingsModal.js index ec979d6..ebb2d91 100644 --- a/smart-hut/src/components/dashboard/devices/DeviceSettingsModal.js +++ b/smart-hut/src/components/dashboard/devices/DeviceSettingsModal.js @@ -1,5 +1,5 @@ import React, { Component, useState } from "react"; -import { Button, Form, Icon, Header, Modal } from "semantic-ui-react"; +import { Button, Form, Icon, Header, Modal, Input } from "semantic-ui-react"; import { connect } from "react-redux"; import { RemoteService } from "../../../remote"; @@ -37,12 +37,11 @@ const SettingsForm = (props) => {
- @@ -85,7 +84,7 @@ class DeviceSettingsModal extends Component { if (values.name.length === 0) return; this.props .saveDevice({ ...this.props.device, name: values.name }) - .then(() => this.setState({ open: false })) + .then(() => this.setState({ openModal: false })) .catch((err) => console.error( `settings modal for device ${this.props.id} deletion error`,