Skip to content

v0.2.3

Compare
Choose a tag to compare
@maaslalani maaslalani released this 18 Dec 16:08
· 210 commits to main since this release
v0.2.3
47340b5

Better Defaults!

Huh? v0.2.3 fixes some bugs for more consistent behaviour across inputs 🐞

  • Text inputs now update values on each keystroke rather than on Blur for consistency.
  • Select and MultiSelect read their default values from the initial values set by the Value variable if provided.

A special thanks to @vitor-mariano for all his contributions to this release 🤗

Defaults Example

You can now have preselected options by declaring them in the Value variable:

var toppings = []string{"Lettuce", "Tomatoes"}
var options = huh.NewOptions("Lettuce", "Tomatoes", "Charm Sauce", "Cheese", "Vegan Cheese")

huh.NewMultiSelect[string]().Title("Toppings").Options(options...).Value(&toppings).Run()

In the above example, Lettuce and Tomatoes will be preselected by default.

What's Changed

Full Changelog: v0.2.2...v0.2.3


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.