mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-12-21 21:51:18 +01:00
feat: adding "emit_update" function
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { ToggleButton } from 'react-bootstrap';
|
||||
import { socket } from '../socket';
|
||||
import { emit_update } from '../socket';
|
||||
import { DocStringComponent } from './DocStringComponent';
|
||||
|
||||
interface ButtonComponentProps {
|
||||
@@ -23,11 +23,7 @@ export const ButtonComponent = React.memo((props: ButtonComponentProps) => {
|
||||
const buttonName = mapping ? (value ? mapping[0] : mapping[1]) : name;
|
||||
|
||||
const setChecked = (checked: boolean) => {
|
||||
socket.emit('frontend_update', {
|
||||
name: name,
|
||||
parent_path: parent_path,
|
||||
value: checked
|
||||
});
|
||||
emit_update(name, parent_path, checked);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user