Skip to content

Commit 7dfa58d

Browse files
authored
Merge pull request #98 from mckervinc/feature/scrollbar-detection
Feature: Scrollbar detection
2 parents af4e244 + 2584887 commit 7dfa58d

20 files changed

Lines changed: 1462 additions & 2984 deletions

.eslintrc

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/deploy-site.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ jobs:
3838
- name: Install yarn
3939
run: npm install -g yarn
4040
- name: Install dependencies
41-
working-directory: ./example
4241
run: |
43-
sed -i '/link:/d' package.json
44-
yarn add react-fluid-table
4542
yarn install
43+
yarn --cwd example install
4644
- name: Build
47-
working-directory: ./example
48-
run: yarn build
45+
run: yarn --cwd example build
4946
- name: Setup Pages
5047
uses: actions/configure-pages@v5
5148
- name: Upload artifact

CHANGELOG.md

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

3+
## 1.3.0
4+
5+
_2025-04-01_
6+
7+
### Features
8+
9+
- added `estimatedRowHeight` back
10+
11+
### Bugix
12+
13+
- isHorizontalScroll uses a scroll bar heuristic of 17
14+
- should handle maxTableHeight a bit better. There _should_ be less jitter
15+
316
## 1.2.7
417

518
_2025-03-31_

eslint.config.mjs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import eslint from "@eslint/js";
2+
import prettierConfig from "eslint-config-prettier";
3+
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
6+
7+
export default tseslint.config(
8+
{ ignores: ["dist", "example", "node_modules", "eslint.config.mjs"] },
9+
eslint.configs.recommended,
10+
tseslint.configs.recommended,
11+
prettierConfig,
12+
// base
13+
{
14+
rules: {
15+
eqeqeq: [
16+
"error",
17+
"always",
18+
{
19+
null: "ignore"
20+
}
21+
],
22+
"no-console": [
23+
"warn",
24+
{
25+
allow: ["warn", "error"]
26+
}
27+
]
28+
}
29+
},
30+
// typescript
31+
{
32+
rules: {
33+
"@typescript-eslint/ban-ts-comment": "warn",
34+
"@typescript-eslint/no-explicit-any": [
35+
"warn",
36+
{
37+
fixToUnknown: true
38+
}
39+
],
40+
"@typescript-eslint/no-unused-vars": [
41+
"error",
42+
{
43+
argsIgnorePattern: "^_",
44+
varsIgnorePattern: "^_",
45+
caughtErrorsIgnorePattern: "^_"
46+
}
47+
],
48+
"@typescript-eslint/consistent-type-definitions": ["error", "type"]
49+
}
50+
},
51+
// react-hooks
52+
{
53+
plugins: { "react-hooks": eslintPluginReactHooks },
54+
rules: eslintPluginReactHooks.configs.recommended.rules
55+
},
56+
// react-refresh
57+
{
58+
plugins: { "react-refresh": reactRefresh },
59+
rules: {
60+
"react-refresh/only-export-components": [
61+
"warn",
62+
{
63+
allowConstantExport: true
64+
}
65+
]
66+
}
67+
}
68+
);

example/.eslintrc.cjs

Lines changed: 0 additions & 28 deletions
This file was deleted.

example/eslint.config.mjs

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import eslint from "@eslint/js";
2+
import prettierConfig from "eslint-config-prettier";
3+
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
6+
7+
export default tseslint.config(
8+
{
9+
ignores: ["dist", "node_modules", "eslint.config.mjs", "tailwind.config.js", "vite.config.ts", "**/vite-env.d.ts"]
10+
},
11+
eslint.configs.recommended,
12+
tseslint.configs.recommended,
13+
prettierConfig,
14+
// base
15+
{
16+
rules: {
17+
eqeqeq: [
18+
"error",
19+
"always",
20+
{
21+
null: "ignore"
22+
}
23+
],
24+
"no-console": [
25+
"warn",
26+
{
27+
allow: ["warn", "error"]
28+
}
29+
]
30+
}
31+
},
32+
// typescript
33+
{
34+
rules: {
35+
"@typescript-eslint/ban-ts-comment": "warn",
36+
"@typescript-eslint/no-explicit-any": [
37+
"warn",
38+
{
39+
fixToUnknown: true
40+
}
41+
],
42+
"@typescript-eslint/no-unused-vars": [
43+
"error",
44+
{
45+
argsIgnorePattern: "^_",
46+
varsIgnorePattern: "^_",
47+
caughtErrorsIgnorePattern: "^_"
48+
}
49+
],
50+
"@typescript-eslint/consistent-type-definitions": ["error", "type"]
51+
}
52+
},
53+
// react-hooks
54+
{
55+
plugins: { "react-hooks": eslintPluginReactHooks },
56+
rules: eslintPluginReactHooks.configs.recommended.rules
57+
},
58+
// react-refresh
59+
{
60+
plugins: { "react-refresh": reactRefresh },
61+
rules: {
62+
"react-refresh/only-export-components": [
63+
"warn",
64+
{
65+
allowConstantExport: true
66+
}
67+
]
68+
}
69+
}
70+
);

example/package.json

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,44 @@
3030
"clsx": "^2.1.1",
3131
"country-flag-icons": "^1.5.18",
3232
"lodash": "^4.17.21",
33-
"lucide-react": "^0.483.0",
34-
"react": "^18.2.0",
35-
"react-dom": "^18.2.0",
33+
"lucide-react": "^0.486.0",
34+
"react": "^19.1.0",
35+
"react-dom": "^19.1.0",
3636
"react-fluid-table": "link:..",
37-
"react-router-dom": "^6.23.1",
37+
"react-router-dom": "^7.4.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",
44+
"@eslint/eslintrc": "^3.3.1",
45+
"@eslint/js": "^9.23.0",
4346
"@types/lodash": "^4.17.13",
4447
"@types/node": "^20.14.2",
45-
"@types/react": "^18.2.15",
46-
"@types/react-dom": "^18.2.7",
48+
"@types/react": "^19.0.12",
49+
"@types/react-dom": "^19.0.4",
4750
"@types/react-syntax-highlighter": "^15.5.13",
48-
"@typescript-eslint/eslint-plugin": "^6.0.0",
49-
"@typescript-eslint/parser": "^6.0.0",
51+
"@typescript-eslint/eslint-plugin": "^8.29.0",
52+
"@typescript-eslint/parser": "^8.29.0",
5053
"@vitejs/plugin-react": "^4.3.4",
5154
"autoprefixer": "^10.4.21",
52-
"eslint": "^8.57.0",
53-
"eslint-config-prettier": "^9.1.0",
55+
"eslint": "9.23.0",
56+
"eslint-config-prettier": "^10.1.1",
57+
"eslint-plugin-prettier": "^5.2.5",
58+
"eslint-plugin-react-hooks": "^5.2.0",
59+
"eslint-plugin-react-refresh": "^0.4.19",
60+
"globals": "^16.0.0",
5461
"postcss": "^8.5.3",
5562
"prettier": "^3.5.3",
5663
"prettier-plugin-tailwindcss": "^0.6.9",
5764
"tailwindcss": "^3.4.17",
5865
"typescript": "^5.8.2",
59-
"vite": "^6.2.2"
66+
"typescript-eslint": "^8.29.0",
67+
"vite": "^6.2.4"
6068
},
6169
"volta": {
62-
"node": "18.18.0",
70+
"node": "20.12.1",
6371
"yarn": "1.22.22"
6472
}
6573
}

example/src/data.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from "@ngneat/falso";
1515
import _ from "lodash";
1616

17-
export interface TestData {
17+
type TestData = {
1818
id: number;
1919
firstName: string;
2020
lastName: string;
@@ -28,14 +28,14 @@ export interface TestData {
2828
city: string;
2929
state: string;
3030
zipCode: string;
31-
}
31+
};
3232

33-
export const testData: TestData[] = _.range(3000).map(i => ({
33+
const testData: TestData[] = _.range(3000).map(i => ({
3434
id: i + 1,
3535
firstName: randFirstName(),
3636
lastName: randLastName(),
3737
email: randEmail(),
38-
avatar: randImg({ width: 134, height: 134 }),
38+
avatar: randImg({ width: 134, height: 134 }).replace("random=", "?random="),
3939
country: randCountryCode().toLowerCase(),
4040
words: randCatchPhrase(),
4141
sentence: randSentence(),
@@ -45,3 +45,5 @@ export const testData: TestData[] = _.range(3000).map(i => ({
4545
state: randStateAbbr(),
4646
zipCode: randZipCode()
4747
}));
48+
49+
export { testData, type TestData };

0 commit comments

Comments
 (0)