Skip to content

MultiSelect's filterable set to "false" will have no effect. #251

Closed

Description

@skatkov

Describe the bug
MultiSelect's filterable set to "false" will have no effect.

To Reproduce
Steps to reproduce the behavior:

  1. run a following code:
package main

import (
	"github.com/charmbracelet/huh"
)

func main() {
	var types []string

	form := huh.NewMultiSelect[string]().
		Filterable(false).
		Options(
			huh.NewOption("Module", "Module").Selected(true),
			huh.NewOption("Constant", "Constant").Selected(true),
			huh.NewOption("Method", "Method").Selected(true),
			huh.NewOption("Attribute", "Attribute"),
			huh.NewOption("Class", "Class").Selected(true),
		).
		Title("Types").
		Value(&types)

	huh.NewForm(huh.NewGroup(form)).Run()

}
  1. Click on "/"
  2. Provide a "constant" value

Expected behavior
Filtering should not be possible on a MultiSelect field because Filterable(false) method was used.

Desktop (please complete the following information):

  • OS: Manjaro/Linux
  • Version github.com/charmbracelet/huh v0.4.2, go 1.22

Activity

  1. added a commit that references this issue on Jul 25, 2024
    29928af
  2. added a commit that references this issue on Nov 20, 2024
    57c1e03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址