Skip to content

Conversation

@mnaoumov
Copy link
Contributor

@mnaoumov mnaoumov commented Jul 8, 2023

Fixes #555

@Zachatoo Zachatoo self-requested a review September 29, 2023 01:07
@Zachatoo
Copy link
Collaborator

Could you also update the docs as part of this PR?

@AB1908
Copy link
Collaborator

AB1908 commented Sep 29, 2023

Can someone remind me how this is different from placeholder? Also, for conformity, should we rename it to default_value?

@tektrip-biggles
Copy link

tektrip-biggles commented May 29, 2024

Can someone remind me how this is different from placeholder? Also, for conformity, should we rename it to default_value?

My understanding is that placeholder simply appears in the prompt box as an aide memoire, whereas default_value would be a valid option from the list presented to the user. E.g. I want to be prompted for task priority so I might use:

<% tp.system.suggester(
  (item) => item, 
  ["1: Highest", "2: High", "3: Medium", "4: Low", "6: Lowest"], 
  false, 
  "Priority",
   5, 
  "3: Medium") 
%>

This way if I press enter as soon as the prompt appears, I'll select "3: Medium" as priority instead of "1: Highest" as currently. This saves two keypresses in the average case and four keypresses in the worst case, which can add up quickly when, say, adding a ton of task notes.

Don't suppose there's any chance this will make its way into main any time soon btw?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default value for suggester

4 participants