hoist-react icon indicating copy to clipboard operation
hoist-react copied to clipboard

Easier options to override grid row background colors

Open TomTirapani opened this issue 7 years ago • 5 comments

GridModel allows devs to set a rowClassFn() to control row-level css classes. Currently, styles set by these row classes can clash with existing styles - for example, changing background-color can break row selection highlight.

Adjust in order to limit unwanted side-effects - ideally, we would be able to set any main style property in a row class and it will behave well with existing styles.

TomTirapani avatar Dec 18 '18 18:12 TomTirapani

To clarify the expectations here - I'm thinking a custom row class:

  • Should override the row striping background
  • Should not override the selection background
  • Should not override the hover background (if enabled)

Are we primarily concerned about these cases (selection more than anything) or do you think we need to defend against / ensure we allow overrides in other cases?

amcclain avatar Mar 27 '19 23:03 amcclain

Linking to #1331 - although not the same thing, feels like we should review both at the same time when we do,

amcclain avatar Aug 29 '19 16:08 amcclain

@TomTirapani can you take another look at this ticket - just the ticket - and let us know if you think we should close this now as not in demand / actionable, or if we should instead keep open as important to track.

amcclain avatar Sep 23 '20 23:09 amcclain

I think we should keep this open, but limit the scope to just the background-color setting specified above.

I'll make an attempt at it as soon as I get chance so we can close this ticket.

TomTirapani avatar Oct 05 '20 10:10 TomTirapani

@jskupsik says he has a recipe for this and has won himself this ancient ticket 😉

amcclain avatar Mar 21 '25 23:03 amcclain