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
Nested choice name collision in MultiSelect #451
Labels
Comments
@jeylost thanks for creating the issue and for the detailed explanation of what's happening. I'm working on a new release and will make sure this gets addressed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
Multisearch functionality does not operate correctly when dealing with nested choices that have repeated names. This issue arises when using the library to create a multiselect prompt with a nested structure where some choices share the same name. Below is a code snippet that replicates the problem.
OS: macOS 14.2.1
Node Version: v20.10.0
Enquirer Version: 2.4.1
Error Messages: No specific error messages are generated, but the selection behavior does not work as expected with nested choices having identical names.
Extensions/Plugins/Helpers: N/A
Code to Reproduce
test repo
Workaround
Inserting ZWSPs in the names makes them unique to JavaScript's string comparison while still appearing visually similar in the terminal.
Example
Visual representation
test.mov
The text was updated successfully, but these errors were encountered: