We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Multiselect shouldn't behave like this. It should return separate results for each option.
Re produce bug:
func TestInteractiveMultiselectPrinter_Show_Duplicated(t *testing.T) { go func() { keyboard.SimulateKeyPress(keys.Enter) keyboard.SimulateKeyPress(keys.Down) keyboard.SimulateKeyPress(keys.Down) keyboard.SimulateKeyPress(keys.Enter) keyboard.SimulateKeyPress(keys.Down) keyboard.SimulateKeyPress(keys.Down) keyboard.SimulateKeyPress(keys.Enter) keyboard.SimulateKeyPress(keys.Tab) }() r, _ := pterm.DefaultInteractiveMultiselect. WithOptions([]string{"a", "a", "a", "a", "a", "a", "a", "a", "a"}). Show() testza.AssertEqual(t, []string{"a", "a", "a"}, r) }
result:
=== RUN TestInteractiveMultiselectPrinter_Show_Duplicated Please select your options: > a interactive_multiselect_printer_test.go:109: 1| Two objects that should be equal, are not equal. 2| 3| Expected: 4| ([]string) (len=3 cap=3) { 5| (string) (len=1) "a", 6| (string) (len=1) "a", 7| (string) (len=1) "a" 8| } 9| 10| Actual: 11| ([]string) (len=1 cap=1) { 12| (string) (len=1) "a" 13| } 14| 15| Difference: 16| (1. -) ([]string) (len=3 cap=3) { 17| (2. -) (string) (len=1) "a", 18| (3. -) (string) (len=1) "a", 19| (1. +) ([]string) (len=1 cap=1) { 20| (2. #) (string) (len=1) "a" 21| (3. #) } --- FAIL: TestInteractiveMultiselectPrinter_Show_Duplicated (0.00s)
The text was updated successfully, but these errors were encountered:
Yes makes sense, I think we just never really considered having the same options multiple times, but I agree that there might be some use cases.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Multiselect shouldn't behave like this. It should return separate results for each option.
Re produce bug:
result:
The text was updated successfully, but these errors were encountered: