survey icon indicating copy to clipboard operation
survey copied to clipboard

Allow editable default for Input prompt

Open mislav opened this issue 2 years ago • 1 comments

When doing

survey.Input{
	Message: "What is your name?",
	Default: "Jordan",
}

the default value "Jordan" is now editable and can be navigated around with the cursor if survey.WithShowCursor(true) was used.

Promoting visibility for this idea: https://github.com/AlecAivazis/survey/issues/196#issuecomment-1067042464

@AlecAivazis Since this is backwards incompatible, what do you think about adding a separate field for editable default value? E.g. DefaultEditable: "Jordan"

mislav avatar May 12 '22 14:05 mislav

Hm, good question. I think having a new field is "alright". it's definitely not great but we're kind of stuck with it. If there are enough little breaks maybe its time to get them together?

AlecAivazis avatar Aug 15 '22 16:08 AlecAivazis