This commit is contained in:
@@ -75,10 +75,10 @@ export class TodoView extends Component.make("TodoView")(function*(props: TodoPr
|
||||
] as const
|
||||
}), [props._tag, props._tag === "edit" ? props.id : undefined])
|
||||
|
||||
const [index, size, canSubmit] = yield* Subscribable.useSubscribables([
|
||||
const [index, size, canCommit] = yield* Subscribable.useSubscribables([
|
||||
indexRef,
|
||||
state.sizeSubscribable,
|
||||
form.canSubmit,
|
||||
form.canCommit,
|
||||
])
|
||||
|
||||
const runSync = yield* Component.useRunSync()
|
||||
@@ -104,7 +104,7 @@ export class TodoView extends Component.make("TodoView")(function*(props: TodoPr
|
||||
/>
|
||||
|
||||
{props._tag === "new" &&
|
||||
<Button disabled={!canSubmit} onClick={() => void runPromise(form.submit)}>
|
||||
<Button disabled={!canCommit} onClick={() => void runPromise(form.submit)}>
|
||||
Add
|
||||
</Button>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user