charmbracelet / charmbracelet/bubbles
table.WithWidth doesn't work properly
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 457
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
Description
**Describe the bug**
Setting it to almost any value causes the table to be rendered in ways you probably didn't expect.
**Setup**
Please complete the following information along with version numbers, if applicable.
- OS [e.g. Ubuntu, macOS] any
- Shell [e.g. zsh, fish] any
- Terminal Emulator [e.g. kitty, iterm] any
- Terminal Multiplexer [e.g. tmux] any
- Locale [e.g. en_US.UTF-8, zh_CN.UTF-8, etc.] any
**To Reproduce**
Steps to reproduce the behavior:
1. You can copy the table example from `bubbletea`
2. Add a `table.WithWidth` [here](https://github.com/charmbracelet/bubbletea/blob/d67033479573c91fc4a0e450fe84bbd0d6db6c5d/examples/table/main.go#L164)
3. Run it
4. See it looks weid
**Source Code**
https://github.com/charmbracelet/bubbletea/blob/d67033479573c91fc4a0e450fe84bbd0d6db6c5d/examples/table/main.go#L164
**Expected behavior**
I'm not sure what it should do, but I think what it's doing now is wrong.
**Screenshots**


**Additional context**
If you remove the widths of the headers, the table is rendered empty. Not sure if intended, weird anyway.
Contributor guide
Assessment
This issue has not been assessed yet.