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

Having Foreground in table.DefaultStyles().Cell breaks the styles from Selected #729

Open
rmscoal opened this issue Feb 9, 2025 · 0 comments

Comments

@rmscoal
Copy link

rmscoal commented Feb 9, 2025

Describe the bug
I tried applying Cell foreground color differently than default (which was white) whilst also applying foreground in Selected breaks the ui of the table.

Setup
Please complete the following information along with version numbers, if applicable.

  • OS: macOs
  • Shell: zsh
  • Terminal Emulator: iTerm2
  • Terminal Multiplexer: -
  • Locale: en_US.UTF-8

To Reproduce
Steps to reproduce the behavior:

  1. Copy the table example code: https://github.com/charmbracelet/bubbletea/blob/main/examples/table/main.go
  2. Add s.Cell = s.Cell.Foreground(lipgloss.Color("26")) beneath s.Selected (line 176)
  3. Run the app and you will see something weird.

Source Code
Please include source code if needed to reproduce the behavior.

Expected behavior
The Selected styles should be applied to the whole row. This case, the background was not applied to all the selected row cells. Furthermore, the Foreground from Selected was also not applied where it should have been applied.

Screenshots
Image

Additional context
Add any other context about the problem here.

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