Skip to content

feat[renderHeaderCell]: pass props into renderHeaderCell for controll… #3694

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-data-grid",
"name": "react-data-grid-pudov",
"version": "7.0.0-beta.47",
"license": "MIT",
"description": "Feature-rich and customizable data grid React component",
Expand Down Expand Up @@ -49,7 +49,8 @@
"prettier:format": "prettier --write .",
"typecheck": "tsc --build",
"prepublishOnly": "npm install && node --run build && node --run build:types",
"postpublish": "git push --follow-tags origin HEAD"
"postpublish": "git push --follow-tags origin HEAD",
"publish": "npm install && npm run build && npm publish --registry <URL вашего реестра>"
},
"dependencies": {
"clsx": "^2.0.0"
Expand Down
3 changes: 2 additions & 1 deletion src/HeaderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ export default function HeaderCell<R, SR>({
column,
sortDirection,
priority,
tabIndex: childTabIndex
tabIndex: childTabIndex,
onColumnResize: (newWidth: number | "max-content") => onColumnResize(column, newWidth),
})}

{resizable && (
Expand Down
22 changes: 11 additions & 11 deletions src/style/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ const lightTheme = `
`;

const darkTheme = `
--rdg-color: #ddd;
--rdg-border-color: #444;
--rdg-summary-border-color: #555;
--rdg-background-color: hsl(0deg 0% 13%);
--rdg-header-background-color: hsl(0deg 0% 10.5%);
--rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);
--rdg-row-hover-background-color: hsl(0deg 0% 9%);
--rdg-row-selected-background-color: hsl(207deg 76% 42%);
--rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);

--rdg-checkbox-focus-color: hsl(207deg 100% 89%);
--rdg-color: #000;
--rdg-border-color: #ddd;
--rdg-summary-border-color: #aaa;
--rdg-background-color: hsl(0deg 0% 100%);
--rdg-header-background-color: hsl(0deg 0% 97.5%);
--rdg-header-draggable-background-color: hsl(0deg 0% 90.5%);
--rdg-row-hover-background-color: hsl(0deg 0% 96%);
--rdg-row-selected-background-color: hsl(207deg 76% 92%);
--rdg-row-selected-hover-background-color: hsl(207deg 76% 88%);

--rdg-checkbox-focus-color: hsl(207deg 100% 69%);
`;

const root = css`
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export interface RenderHeaderCellProps<TRow, TSummaryRow = unknown> {
sortDirection: SortDirection | undefined;
priority: number | undefined;
tabIndex: number;
onColumnResize: (newWidth: number | "max-content") => void
}

export interface CellRendererProps<TRow, TSummaryRow>
Expand Down