updates frontend components to use new methods from socket.ts

This commit is contained in:
Mose Müller
2023-11-09 13:52:23 +01:00
parent a750644c20
commit d18be54284
8 changed files with 27 additions and 24 deletions

View File

@@ -1,6 +1,6 @@
import React, { useEffect, useRef } from 'react';
import { InputGroup, Form, Row, Col } from 'react-bootstrap';
import { emit_update } from '../socket';
import { setAttribute } from '../socket';
import { DocStringComponent } from './DocStringComponent';
interface EnumComponentProps {
@@ -33,7 +33,7 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
}, [props.value]);
const handleValueChange = (newValue: string) => {
emit_update(name, parentPath, newValue);
setAttribute(name, parentPath, newValue);
};
return (