-
Notifications
You must be signed in to change notification settings - Fork 26
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
How can I alternate row styles? #173
Comments
Hey there, this feels like a bit of an obvious oversight... let me take a look at this over the weekend when I get some time, apologies for the late response! |
I've added a way to provide a row styling function which is demonstrated in the |
Hi @flippedcracker just checking if you were able to take a look at this to see if there was anything missing? If I don't hear back in a few days I'll close this issue for now, but obviously please feel free to reopen if there's still something missing. |
Sorry for the late response. And thank you for the quick fix. The fix works great for a static table. Can I still highlight selected rows with this? |
I figured out to use the WithRows().HighlightStyle() Thanks! Edit: looks like that doesn't change the background, just the foreground. |
Just to be more complete; If you use the HighlightStyle with the WithRowsStyleFunc, it appears that only the foreground color of the currently highlighted row will change the to the Highlight Style specified. The background color stays the same as what is defined in the WithRowStyleFunc. |
Apologies for the late response on this as life has been busy lately, I'll take another look at this when I get some time hopefully in the near future! |
Released a fix that should hopefully solve this in v0.16.1. The idea is that the highlighted row style is actually a poor fit for a custom style func anyway, because a single highlighted style may not apply properly. So the better way to approach this is to give the user control over what a highlighted row looks like with their custom style function, just passing it in as input. Let me know if this solves things more fully. Apologies again for the wait! |
Not OP, but this solution works. |
I've been using the lipgloss table module, but I like some of the options this one provides. But I don't see how to easily style every other row. Before, I was using the StyleFunc. Can you give any guidance?
The text was updated successfully, but these errors were encountered: