-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept null for defaultValue in addition to undefined
Closes T-689
- Loading branch information
1 parent
380c8e2
commit be5cd30
Showing
4 changed files
with
44 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -727,7 +727,7 @@ const interval = new Interval({ | |
let i = 0 | ||
|
||
while (i < 2) { | ||
await io.group([ | ||
const responses = await io.group([ | ||
io.input | ||
.text('Empty text input', { | ||
placeholder: 'Text goes here', | ||
|
@@ -742,7 +742,7 @@ const interval = new Interval({ | |
defaultValue: new Date(), | ||
}), | ||
io.input.boolean('Boolean input').optional(), | ||
io.input.boolean('Boolean input', { defaultValue: true }), | ||
io.input.boolean('Boolean input', { defaultValue: null }), | ||
io.select | ||
.single('Select something', { | ||
options: [1, 2, 3], | ||
|
@@ -752,11 +752,13 @@ const interval = new Interval({ | |
options: [1, 2, 3], | ||
defaultValue: 1, | ||
}), | ||
io.input.number('Number input').optional(), | ||
io.input.number('Number input', { defaultValue: null }).optional(), | ||
io.input.number('Number input', { defaultValue: 100 }), | ||
io.input.email('Email input').optional(), | ||
io.input.email('Email input', { defaultValue: '[email protected]' }), | ||
io.input.richText('Rich text input').optional(), | ||
io.input | ||
.richText('Rich text input', { defaultValue: null }) | ||
.optional(), | ||
io.input.richText('Rich text input', { | ||
defaultValue: 'Hello world', | ||
}), | ||
|
@@ -807,6 +809,8 @@ const interval = new Interval({ | |
io.input.file('File input').optional(), | ||
]) | ||
|
||
console.debug(responses) | ||
|
||
i++ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters