Conversation
|
I'm interested in your comments, @bleakley @platypii. I used the same logic to pass class names to inner components as I did in hyperparam (https://github.com/hyparam/hyperparam-cli/blob/master/src/hooks/useConfig.ts). But if you know a better API or pattern, I would be happy to switch to it. |
|
|
||
| const ariaColCount = data.header.length + 1 // don't forget the selection column | ||
| const ariaRowCount = data.numRows + 1 // don't forget the header row | ||
| return <ColumnWidthProvider localStorageKey={`${cacheKey}:column-widths`}> |
|
I'm not sure I like the How is the stuff in config different than any of the other HighTable "config" options like Adding the provider seems like unnecessary complexity too. I understand the desire to combine some of the options, there are a lot right now. Would a more logical grouping be a new style prop? interface StyleProps {
styled?: boolean
customClass?: {
hightable?: string
columnHeaders?: (string|undefined)[] // array of custom classes for each column header, by "df.header" 0-based index
}
}Or maybe just plumb through a |
|
You're right; it's much clearer now. I also passed the column class name to the column cells. It's free, and it lets you apply styles to them if needed. .custom-hightable thead th.delegated {
background-color: #f3d373;
}
.custom-hightable tbody tr:not(:hover) td.delegated {
background-color: #ffe9a9;
}<HighTable
data={data}
className="custom-hightable"
columnClassNames={[undefined, undefined, 'delegated']}
/> |
platypii
left a comment
There was a problem hiding this comment.
This opens up a whole bunch of cool style options! Love it


fixes #61