0.1.0 #1
@@ -76,10 +76,10 @@ export const Todo = Component.make(function* Todo(props: TodoProps) {
|
||||
</IconButton>
|
||||
|
||||
<IconButton
|
||||
disabled={props.index >= todosSize}
|
||||
disabled={props.index >= todosSize - 1}
|
||||
onClick={() => Runtime.runSync(runtime)(
|
||||
Ref.updateSome(state.ref, todos => Option.gen(function*() {
|
||||
if (props.index >= Chunk.size(todos))
|
||||
if (props.index >= Chunk.size(todos) - 1)
|
||||
return yield* Option.none()
|
||||
|
||||
const toSwapIndex = props.index + 1
|
||||
|
||||
Reference in New Issue
Block a user