Skip to content

Commit 0332492

Browse files
committed
[demo] Return undefined as typing
1 parent e06f5cf commit 0332492

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

site/demos/04_todo/v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const NewTodo = () => {
151151
const handleKeyDown = useAddRowCallback(
152152
'todos',
153153
({which, target: {value: text}}) =>
154-
which == 13 && text != '' ? {text} : null,
154+
which == 13 && text != '' ? {text} : undefined,
155155
[],
156156
undefined,
157157
() => setText(''),

site/demos/04_todo/v2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ appears in the current IndexView component:
275275
const handleKeyDown = useAddRowCallback(
276276
'todos',
277277
({which, target: {value: text}}) =>
278-
- which == 13 && text != '' ? {text} : null,
279-
+ which == 13 && text != '' ? {text, type} : null,
278+
- which == 13 && text != '' ? {text} : undefined,
279+
+ which == 13 && text != '' ? {text, type} : undefined,
280280
- [],
281281
+ [type],
282282
undefined,

site/demos/04_todo/v5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ creates a new todo:
106106
const handleKeyDown = useAddRowCallback(
107107
'todos',
108108
({which, target: {value: text}}) =>
109-
which == 13 && text != '' ? {text, type} : null,
109+
which == 13 && text != '' ? {text, type} : undefined,
110110
[type],
111111
undefined,
112112
- () => setText(''),

0 commit comments

Comments
 (0)