Skip to content
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

Group LayoutColumn width not applied when group has no Input field #525

Open
jonas-grgt opened this issue Feb 8, 2025 · 0 comments
Open

Comments

@jonas-grgt
Copy link

jonas-grgt commented Feb 8, 2025

When applying a LayoutColumn with a group having no Input field the layout width is not applied whereas I would expect the two groups to be distributed evenly across the available width.

func main() {
	form := huh.NewForm(
		huh.NewGroup(
			huh.NewSelect[string]().Title("Select").Options(
				huh.NewOption("First", "first"),
				huh.NewOption("Second", "second"),
			),
			huh.NewSelect[string]().Title("Select").Options(
				huh.NewOption("First", "first"),
				huh.NewOption("Second", "second"),
			),
			huh.NewSelect[string]().Title("Select").Options(
				huh.NewOption("First", "first"),
				huh.NewOption("Second", "second"),
			),
		).Title("Group Title"),
		huh.NewGroup(
			huh.NewInput().Title("First"),
			huh.NewInput().Title("Second"),
			huh.NewInput().Title("Third"),
		).Title("Group Title"),
	)
	form.WithLayout(huh.LayoutColumns(2))
	form.Run()
}
@jonas-grgt jonas-grgt changed the title LayoutColumn width not applied when group has no Input field Group LayoutColumn width not applied when group has no Input field Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant