Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use localStorage to save input values for auto suggestions #132

Closed
c4spar opened this issue Jan 8, 2021 · 0 comments · Fixed by #202
Closed

Use localStorage to save input values for auto suggestions #132

c4spar opened this issue Jan 8, 2021 · 0 comments · Fixed by #202
Labels
enhancement New feature or request module:prompt prompt module

Comments

@c4spar
Copy link
Owner

c4spar commented Jan 8, 2021

If denoland/deno#1657 lands, we can use the localStorage to automatically save input values for auto suggestions.

await Input.prompt({
  message: "Choose a color",
  suggestions: "local-storage-id", // Will be used as localStorage key to save suggestions.
});

await Input.prompt({
  message: "Choose a color",
  suggestions: {
    name: "local-storage-id",
    options: ["red", "blue", "green"], // Default suggestions. Will be used if no suggestions are available in localStorage.
  }
});
@c4spar c4spar added enhancement New feature or request module:prompt prompt module labels Jan 8, 2021
@c4spar c4spar closed this as completed May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module:prompt prompt module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant