Closed
Description
Currently, we have some freaky behaviours in that value
is repurposed through the lifetime of a prompt.
Let's take autocomplete multi for example. It goes like this:
value
is empty- user types in
foo
value
is now"foo"
- user selects the "foo" option with
<TAB>
- user presses
<RETURN>
value
is now[ 'foo' ]
so the type is basically string | undefined | string[]
this is pretty confusing and means functions which deal with value
(like validate
) have no clue what type the value
will be
could be a string, an array, an object, whatever. its basically unknown
i think we should mutate some internal value
which represents user input (when they type something in), and mutate value
for the prompt's strongly typed value
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Needs triage