Skip to content

Conversation

MuhamedUsman
Copy link

@MuhamedUsman MuhamedUsman commented Apr 9, 2025

Selected row styling not applying to individual cells.

s := table.DefaultStyles()
	s.Header = s.Header.
		BorderStyle(lipgloss.NormalBorder()).
		BorderForeground(lipgloss.Color("240")).
		BorderBottom(true).
		Bold(false)
	s.Selected = s.Selected.
		Foreground(lipgloss.Color("229")).
		Background(lipgloss.Color("57")).
		Bold(true).
		Italic(true).
		Underline(true)
	s.Cell = s.Cell.
		Foreground(lipgloss.Color("57"))
	t.SetStyles(s)

Before:
Before
After:
Before

You can experiment further...

- Now applies necessary selected row styling to the individual cells.
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

Successfully merging this pull request may close these issues.

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

1 participant