anvilistas / anvil-extras

Other
84 stars 25 forks source link

Clarification about MultiSelectDropdown #154

Closed stenci closed 3 years ago

stenci commented 3 years ago

I have two questions about the MultiSelectDropdown:

  1. What does the enable_filtering property do? I looked both at the documentation and at the code, and couldn't figure it out.
  2. What does this mean in the documentation? If set to an iterable of dicts the keys for each item can include any of: ...

I think I understand the meaning of the statement, but... isn't it obvious? Why would those terms not be otherwise allowed? Is there something I need to know when I do NOT set it to an iterable of dicts?

s-cork commented 3 years ago
  1. Enable filtering supports a search bar when you click the dropdown.

  2. In the same way that if you set it to an iterable of tuples the first value is what is displayed, the second value is what is selected. When you set it to an iterable of dicts you have more control. The value is the value. The icon is the icon. The key is what is displayed. Enabled is whether the option is enabled.

I'll add some clarification in the docs.