further improving the component interface.
This commit is contained in:
parent
d36a94badc
commit
b9e22e1ea4
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
$: {
|
$: {
|
||||||
if ($composerBob.state) {
|
if ($composerBob.state) {
|
||||||
$me.do.machine.send($composerBob.state);
|
$me.do.state.send($composerBob.state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Call testAlert
|
// Call testAlert
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
export let me;
|
export let me;
|
||||||
|
|
||||||
const handleButton = () => {
|
const handleButton = () => {
|
||||||
if ($me.do.machine) {
|
if ($me.do.state) {
|
||||||
$me.do.machine.send('TOGGLE');
|
$me.do.state.send('TOGGLE');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
$: {
|
$: {
|
||||||
// Send events to the state machine based on the validation status
|
// Send events to the state machine based on the validation status
|
||||||
if (!($errors.name || $errors.email || $errors.about || $errors.age || $errors.favoriteFood)) {
|
if (!($errors.name || $errors.email || $errors.about || $errors.age || $errors.favoriteFood)) {
|
||||||
$me.do.machine.send('VALIDATE');
|
$me.do.state.send('VALIDATE');
|
||||||
} else {
|
} else {
|
||||||
$me.do.machine.send('INVALIDATE');
|
$me.do.state.send('INVALIDATE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,8 +65,9 @@
|
|||||||
id: component.id,
|
id: component.id,
|
||||||
do: {
|
do: {
|
||||||
core: coreServices,
|
core: coreServices,
|
||||||
machine: component.machineService || null
|
state: component.machineService || null
|
||||||
}
|
},
|
||||||
|
data: component.data || {} // Add this line
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (component.children) {
|
if (component.children) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user