Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit 8b12ebb

Browse files
committed
Expose overscan
1 parent a0df2cf commit 8b12ebb

File tree

5 files changed

+1058
-1021
lines changed

5 files changed

+1058
-1021
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"plugin:import/typescript",
2121
"plugin:react-hooks/recommended",
2222
"plugin:promise/recommended",
23-
"plugin:unicorn/recommended"
23+
"plugin:unicorn/recommended",
24+
"plugin:storybook/recommended"
2425
],
2526
"plugins": [
2627
"@typescript-eslint",

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## 4.1.0
6+
* overscan: number | { main: number ; reverse: number }
7+
The property accepts pixel values.
8+
* Bump deps
9+
510
## 4.0.0-beta.10
611
* Update some TS types
712
* Bump deps

package.json

+29-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nosferatu500/react-sortable-tree",
3-
"version": "4.0.6",
3+
"version": "4.1.0",
44
"description": "Drag-and-drop sortable component for nested data and hierarchies",
55
"main": "./index.js",
66
"types": "./index.d.ts",
@@ -65,64 +65,65 @@
6565
"license": "MIT",
6666
"bugs": "https://github.com/nosferatu500/react-sortable-tree/issues",
6767
"dependencies": {
68-
"@nosferatu500/react-dnd-scrollzone": "^2.0.7",
68+
"@nosferatu500/react-dnd-scrollzone": "^2.0.8",
6969
"lodash.isequal": "^4.5.0",
7070
"react-dnd": "14.0.4",
7171
"react-dnd-html5-backend": "^14.1.0",
72-
"react-virtuoso": "^2.6.0"
72+
"react-virtuoso": "^2.8.5"
7373
},
7474
"devDependencies": {
75-
"@babel/core": "^7.17.0",
75+
"@babel/core": "^7.17.8",
7676
"@babel/eslint-parser": "^7.17.0",
7777
"@babel/helper-module-imports": "^7.16.7",
78-
"@babel/plugin-transform-react-jsx": "^7.16.7",
78+
"@babel/plugin-transform-react-jsx": "^7.17.3",
7979
"@babel/preset-env": "^7.16.11",
8080
"@babel/types": "^7.17.0",
81-
"@nosferatu500/theme-file-explorer": "^3.0.15",
82-
"@rollup/plugin-babel": "^5.3.0",
81+
"@nosferatu500/theme-file-explorer": "^3.0.16",
82+
"@rollup/plugin-babel": "^5.3.1",
8383
"@rollup/plugin-node-resolve": "^13.1.3",
84-
"@rollup/plugin-typescript": "^8.3.0",
84+
"@rollup/plugin-typescript": "^8.3.1",
8585
"@storybook/addon-postcss": "^2.0.0",
86-
"@storybook/addons": "^6.4.18",
87-
"@storybook/react": "^6.4.18",
88-
"@storybook/theming": "^6.4.18",
86+
"@storybook/addons": "^6.4.19",
87+
"@storybook/react": "^6.4.19",
88+
"@storybook/theming": "^6.4.19",
8989
"@types/babel-plugin-macros": "^2.8.5",
9090
"@types/lodash.isequal": "^4.5.5",
91-
"@types/react": "^17.0.39",
92-
"@types/react-dom": "^17.0.11",
93-
"@typescript-eslint/eslint-plugin": "^5.11.0",
94-
"@typescript-eslint/parser": "^5.11.0",
91+
"@types/react": "^17.0.43",
92+
"@types/react-dom": "^17.0.14",
93+
"@typescript-eslint/eslint-plugin": "^5.17.0",
94+
"@typescript-eslint/parser": "^5.17.0",
9595
"acorn-jsx": "^5.3.2",
96-
"autoprefixer": "^10.4.2",
96+
"autoprefixer": "^10.4.4",
9797
"babel-plugin-macros": "^3.1.0",
98-
"esbuild": "^0.14.20",
99-
"eslint": "^8.8.0",
98+
"esbuild": "^0.14.28",
99+
"eslint": "^8.12.0",
100100
"eslint-config-airbnb": "^19.0.4",
101-
"eslint-config-airbnb-typescript": "^16.1.0",
102-
"eslint-config-prettier": "^8.3.0",
103-
"eslint-import-resolver-typescript": "^2.5.0",
101+
"eslint-config-airbnb-typescript": "^16.1.4",
102+
"eslint-config-prettier": "^8.5.0",
103+
"eslint-import-resolver-typescript": "^2.7.0",
104104
"eslint-plugin-import": "^2.25.4",
105105
"eslint-plugin-jsx-a11y": "^6.5.1",
106106
"eslint-plugin-prettier": "^4.0.0",
107107
"eslint-plugin-promise": "^6.0.0",
108-
"eslint-plugin-react": "^7.28.0",
108+
"eslint-plugin-react": "^7.29.4",
109109
"eslint-plugin-react-hooks": "^4.3.0",
110-
"eslint-plugin-sonarjs": "^0.11.0",
111-
"eslint-plugin-unicorn": "^40.1.0",
110+
"eslint-plugin-sonarjs": "^0.12.0",
111+
"eslint-plugin-storybook": "^0.5.7",
112+
"eslint-plugin-unicorn": "^41.0.1",
112113
"json": "^11.0.0",
113-
"postcss": "^8.4.6",
114-
"prettier": "^2.5.1",
114+
"postcss": "^8.4.12",
115+
"prettier": "^2.6.1",
115116
"prop-types": "^15.8.1",
116117
"react": "^17.0.2",
117118
"react-dnd-touch-backend": "^14.1.1",
118119
"react-dom": "^17.0.2",
119120
"rimraf": "^3.0.2",
120-
"rollup": "^2.67.1",
121+
"rollup": "^2.70.1",
121122
"rollup-plugin-esbuild": "^4.8.2",
122123
"rollup-plugin-postcss": "^4.0.2",
123124
"shx": "^0.3.4",
124125
"tslib": "^2.3.1",
125-
"typescript": "^4.5.5"
126+
"typescript": "^4.6.3"
126127
},
127128
"peerDependencies": {
128129
"react": ">=17.0.2",

src/react-sortable-tree.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,8 @@ export type ReactSortableTreeProps = {
910910
rowDirection?: string
911911

912912
debugMode?: boolean
913+
914+
overscan?: number | { main: number; reverse: number }
913915
}
914916

915917
ReactSortableTree.defaultProps = {
@@ -940,6 +942,7 @@ ReactSortableTree.defaultProps = {
940942
onlyExpandSearchedNodes: false,
941943
rowDirection: 'ltr',
942944
debugMode: false,
945+
overscan: 0,
943946
}
944947

945948
const SortableTreeWithoutDndContext = function (props: ReactSortableTreeProps) {

0 commit comments

Comments
 (0)