table.WithWidth doesn't work properly
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:
- You can copy the table example from
bubbletea - Add a
table.WithWidthhere - Run it
- 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.
i can fix him
LOL, in all seriousness I do wonder if my lipgloss table branch might fix this though. That thing is so close, just needs a bit of polish I think
let me know if I can help you with it 🙏🏻
@caarlos0 just prepare a PR? ;)