Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Allow editable default for Input prompt#421

Draft
mislav wants to merge 1 commit into
AlecAivazis:masterfrom
mislav:default-editable
Draft

Allow editable default for Input prompt#421
mislav wants to merge 1 commit into
AlecAivazis:masterfrom
mislav:default-editable

Conversation

@mislav

@mislav mislav commented May 12, 2022

Copy link
Copy Markdown
Collaborator

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: #196 (comment)

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

@mislav mislav requested a review from AlecAivazis May 12, 2022 14:14
@AlecAivazis

Copy link
Copy Markdown
Owner

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants