Skip to content

Commit aef2828

Browse files
authored
Merge pull request #99 from mckervinc/feature/css-grid
Feature: Simplify Horizontal Scroll Behavior
2 parents 7555d0f + 10fd6d9 commit aef2828

17 files changed

+778
-810
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# CHANGELOG
22

3+
## 1.4.0
4+
5+
_2025-04-18_
6+
7+
### Breaking
8+
9+
- removed `rowRenderer` functionality.
10+
- removed `.rft-row-container`, `.rft-outer-container`, and `.rft-inner-container`. as css class names.
11+
12+
### Bugfix
13+
14+
- on certain devices, the background color of the row did not fill the table. This should be resolved.
15+
- no need for `isHorizontalScroll` hack
16+
317
## 1.3.0
418

519
_2025-04-01_

example/package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,52 +19,52 @@
1919
"@fortawesome/free-solid-svg-icons": "^6.7.2",
2020
"@fortawesome/react-fontawesome": "^0.2.2",
2121
"@ngneat/falso": "^7.3.0",
22-
"@radix-ui/react-accordion": "^1.2.3",
23-
"@radix-ui/react-checkbox": "^1.1.4",
24-
"@radix-ui/react-label": "^2.1.2",
25-
"@radix-ui/react-popover": "^1.1.6",
26-
"@radix-ui/react-radio-group": "^1.2.3",
27-
"@radix-ui/react-slot": "^1.1.2",
28-
"@radix-ui/react-switch": "^1.1.3",
22+
"@radix-ui/react-accordion": "^1.2.7",
23+
"@radix-ui/react-checkbox": "^1.2.2",
24+
"@radix-ui/react-label": "^2.1.4",
25+
"@radix-ui/react-popover": "^1.1.10",
26+
"@radix-ui/react-radio-group": "^1.3.2",
27+
"@radix-ui/react-slot": "^1.2.0",
28+
"@radix-ui/react-switch": "^1.2.2",
2929
"class-variance-authority": "^0.7.1",
3030
"clsx": "^2.1.1",
3131
"country-flag-icons": "^1.5.18",
3232
"lodash": "^4.17.21",
33-
"lucide-react": "^0.486.0",
33+
"lucide-react": "^0.501.0",
3434
"react": "^19.1.0",
3535
"react-dom": "^19.1.0",
3636
"react-fluid-table": "link:..",
37-
"react-router-dom": "^7.4.1",
37+
"react-router-dom": "^7.5.1",
3838
"react-syntax-highlighter": "^15.6.1",
3939
"tailwind-merge": "^2.5.5",
4040
"tailwindcss-animate": "^1.0.7"
4141
},
4242
"devDependencies": {
43-
"@eslint/compat": "^1.2.7",
43+
"@eslint/compat": "^1.2.8",
4444
"@eslint/eslintrc": "^3.3.1",
45-
"@eslint/js": "^9.23.0",
46-
"@types/lodash": "^4.17.13",
47-
"@types/node": "^20.14.2",
48-
"@types/react": "^19.0.12",
49-
"@types/react-dom": "^19.0.4",
45+
"@eslint/js": "^9.25.0",
46+
"@types/lodash": "^4.17.16",
47+
"@types/node": "^20",
48+
"@types/react": "^19",
49+
"@types/react-dom": "^19",
5050
"@types/react-syntax-highlighter": "^15.5.13",
51-
"@typescript-eslint/eslint-plugin": "^8.29.0",
52-
"@typescript-eslint/parser": "^8.29.0",
53-
"@vitejs/plugin-react": "^4.3.4",
51+
"@typescript-eslint/eslint-plugin": "^8.30.1",
52+
"@typescript-eslint/parser": "^8.30.1",
53+
"@vitejs/plugin-react": "^4.4.0",
5454
"autoprefixer": "^10.4.21",
55-
"eslint": "9.23.0",
56-
"eslint-config-prettier": "^10.1.1",
57-
"eslint-plugin-prettier": "^5.2.5",
55+
"eslint": "9.24.0",
56+
"eslint-config-prettier": "^10.1.2",
57+
"eslint-plugin-prettier": "^5.2.6",
5858
"eslint-plugin-react-hooks": "^5.2.0",
5959
"eslint-plugin-react-refresh": "^0.4.19",
6060
"globals": "^16.0.0",
6161
"postcss": "^8.5.3",
6262
"prettier": "^3.5.3",
63-
"prettier-plugin-tailwindcss": "^0.6.9",
63+
"prettier-plugin-tailwindcss": "^0.6.11",
6464
"tailwindcss": "^3.4.17",
65-
"typescript": "^5.8.2",
66-
"typescript-eslint": "^8.29.0",
67-
"vite": "^6.2.4"
65+
"typescript": "^5.8.3",
66+
"typescript-eslint": "^8.30.1",
67+
"vite": "^6.3.2"
6868
},
6969
"volta": {
7070
"node": "20.12.1",

example/src/ColumnProps.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import React from "react";
22
import { ColumnProps, Table } from "react-fluid-table";
33
import { InlineCode } from "./components/library/InlineCode";
44

5-
interface PropData {
5+
type PropData = {
66
prop: string;
77
type: string;
88
description: React.ReactNode;
99
required?: boolean;
1010
content?: () => React.ReactNode;
1111
expandedType?: () => React.ReactNode;
1212
default?: string | number;
13-
}
13+
};
1414

1515
const columns: ColumnProps<PropData>[] = [
1616
{
@@ -147,7 +147,7 @@ const ColumnPropsTable = () => (
147147
data={data}
148148
columns={columns}
149149
tableHeight={400}
150-
className="border border-solid border-[#ececec] [&_.rft-cell:last]:border-none [&_.rft-cell]:border-r [&_.rft-cell]:border-solid [&_.rft-cell]:border-r-[#ececec] [&_.rft-header-cell-text]:text-[#ff79c5] [&_.rft-header-cell:last]:border-none [&_.rft-header-cell]:border-r [&_.rft-header-cell]:border-solid [&_.rft-header-cell]:border-r-[#ececec] [&_.rft-header]:bg-[#282a36] [&_.rft-row-container]:border-b [&_.rft-row-container]:border-b-[#ececec] last:[&_.rft-row-container]:border-b-0"
150+
className="border border-solid border-[#ececec] [&_.rft-cell:last]:border-none [&_.rft-cell]:border-r [&_.rft-cell]:border-solid [&_.rft-cell]:border-r-[#ececec] [&_.rft-header-cell-text]:text-[#ff79c5] [&_.rft-header-cell:last]:border-none [&_.rft-header-cell]:border-r [&_.rft-header-cell]:border-solid [&_.rft-header-cell]:border-r-[#ececec] [&_.rft-header]:bg-[#282a36] [&_.rft-row]:border-b [&_.rft-row]:border-b-[#ececec] last:[&_.rft-row]:border-b-0"
151151
/>
152152
);
153153

example/src/Props.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ const data: PropData[] = [
189189
type: "(value: { row: any, index: number, event?: Event }) => void",
190190
description: "optional click handler for the rows in the table"
191191
},
192-
{
193-
prop: "rowRenderer",
194-
type: "(props: CellElement) => Element",
195-
description:
196-
"A custom element used to wrap an entire row. This provides another way of customizing each row of the table"
197-
},
198192
{
199193
prop: "footerComponent",
200194
type: "(props: FooterProps) => Element",
@@ -295,7 +289,7 @@ const Props = () => {
295289
data={data}
296290
columns={columns}
297291
tableHeight={500}
298-
className="border border-solid border-[#ececec] [&_.rft-cell:last]:border-none [&_.rft-cell]:border-r [&_.rft-cell]:border-solid [&_.rft-cell]:border-r-[#ececec] [&_.rft-header-cell-text]:text-[#ff79c5] [&_.rft-header-cell:last]:border-none [&_.rft-header-cell]:border-r [&_.rft-header-cell]:border-solid [&_.rft-header-cell]:border-r-[#ececec] [&_.rft-header]:bg-[#282a36] [&_.rft-row-container]:border-b [&_.rft-row-container]:border-b-[#ececec] last:[&_.rft-row-container]:border-b-0"
292+
className="border border-solid border-[#ececec] [&_.rft-cell:last]:border-none [&_.rft-cell]:border-r [&_.rft-cell]:border-solid [&_.rft-cell]:border-r-[#ececec] [&_.rft-header-cell-text]:text-[#ff79c5] [&_.rft-header-cell:last]:border-none [&_.rft-header-cell]:border-r [&_.rft-header-cell]:border-solid [&_.rft-header-cell]:border-r-[#ececec] [&_.rft-header]:bg-[#282a36] [&_.rft-row]:border-b [&_.rft-row]:border-b-[#ececec] last:[&_.rft-row]:border-b-0"
299293
/>
300294
<div className="my-8 border-b border-t border-solid border-b-[rgba(255,255,255,.1)] border-t-[rgba(34,36,38,.15)]" />
301295
<div className="mb-3.5 mt-6 border-b-2 border-solid border-[#db2828] pb-1 text-lg font-bold leading-[1.28571429em] text-[#db2828]">

example/src/examples/07-controlled.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,17 @@ const Controlled = ({ data, height, columns: variableColumns }: ControlledProps)
101101
);
102102
};
103103

104-
interface ToggleType {
104+
type ToggleType = {
105105
data: boolean;
106106
height: boolean;
107107
columns: boolean;
108-
}
108+
};
109109

110-
interface DataType {
110+
type DataType = {
111111
data: TestData[];
112112
height: number;
113113
columns: ColumnProps<TestData>[];
114-
}
114+
};
115115

116116
type keyM = keyof ToggleType;
117117
type keyD = keyof DataType;

example/src/examples/08-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { faChevronUp, faChevronDown } from "@fortawesome/free-solid-svg-icons";
77
import { cn } from "@/lib/utils";
88
import { useSource, useTitle } from "@/hooks/useTitle";
99

10-
interface HeaderCellProps extends HeaderProps {
10+
type HeaderCellProps = HeaderProps & {
1111
name?: string;
12-
}
12+
};
1313

1414
const HeaderCell = ({ name, sortDirection, style, onClick }: HeaderCellProps) => {
1515
const icon = !sortDirection ? null : (

0 commit comments

Comments
 (0)