update modbus db and view
This commit is contained in:
@@ -15,6 +15,7 @@ const ModbusModal = ({i18n, open, type, data, onSubmit, onClose}) => {
|
||||
let json = {
|
||||
name: '',
|
||||
node: '',
|
||||
type: '',
|
||||
id: data.uid || '',
|
||||
original_node: data.node || ''
|
||||
};
|
||||
@@ -23,6 +24,8 @@ const ModbusModal = ({i18n, open, type, data, onSubmit, onClose}) => {
|
||||
if(n && 'value' in n) json.name = n.value;
|
||||
let nn = e.querySelector('input[name="node"]');
|
||||
if(nn && 'value' in nn) json.node = nn.value;
|
||||
let type = e.querySelector('input[name="type"]');
|
||||
if(type && 'value' in type) json.type = type.value;
|
||||
|
||||
return json ;
|
||||
}}>
|
||||
@@ -30,7 +33,10 @@ const ModbusModal = ({i18n, open, type, data, onSubmit, onClose}) => {
|
||||
<Input name="name" defaultValue={data.name || ''} label="Name"/>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Input name="node" defaultValue={data.node || ''} label="Node"/>
|
||||
<Input name="node" defaultValue={data.node} label="Node"/>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
<Input name="type" defaultValue={data.type} label="Type" placeholder="預設請留空"/>
|
||||
</Form.Field>
|
||||
<Grid columns={2}>
|
||||
<Grid.Column>
|
||||
|
||||
Reference in New Issue
Block a user