Closed lforst closed 1 year ago
Latest commit: be76cb27c7ca26dd083f20b1bdca303449d8f948
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
I need this feature urgently!!!
This PR adds a
maxItems
option to@clack/prompts
's select prompt that allows to limit the number of shown options at any given time.When using this option, any list of options that exceeds
maxItems
will instead show a scrollable list. The "scrollability" is denoted by ellipses ("...").I am not opinionated about the name
maxItems
for the option. We could also name itmaxItemsShown
or something similar.Ref https://github.com/getsentry/sentry-wizard/issues/286 Resolves https://github.com/natemoo-re/clack/issues/118
Example:
https://github.com/natemoo-re/clack/assets/8118419/72577604-ac18-4538-ba71-0fd19159f50b