charmbracelet / bubbles

TUI components for Bubble Tea 🫧
MIT License
5.24k stars 247 forks source link

How to define the color of a specified cell in a table #502

Open JJ-H opened 4 months ago

JJ-H commented 4 months ago

Describe the bug When I specified the color of cell text,I got a unexpected table style, cell text disappear

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

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Source Code

acceptMsg := lipgloss.NewStyle().Inline(true).Foreground(lipgloss.Color("#BBFFFF")).Render("Accept")
rows = append(rows, table.Row{pr.Title, pr.Number, pr.Creator.Name, acceptMsg, conflictMsg, mergeCheckMsg})

Expected behavior AcceptMsg display with color and table style is correct.

Screenshots Accept disappeared !

image

Additional context Add any other context about the problem here.