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

Commit

Permalink
Expose overscan
Browse files Browse the repository at this point in the history
  • Loading branch information
nosferatu500 committed Mar 29, 2022
1 parent a0df2cf commit 8b12ebb
Show file tree
Hide file tree
Showing 5 changed files with 1,058 additions and 1,021 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"plugin:import/typescript",
"plugin:react-hooks/recommended",
"plugin:promise/recommended",
"plugin:unicorn/recommended"
"plugin:unicorn/recommended",
"plugin:storybook/recommended"
],
"plugins": [
"@typescript-eslint",
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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.

## 4.1.0
* overscan: number | { main: number ; reverse: number }
The property accepts pixel values.
* Bump deps

## 4.0.0-beta.10
* Update some TS types
* Bump deps
Expand Down
57 changes: 29 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nosferatu500/react-sortable-tree",
"version": "4.0.6",
"version": "4.1.0",
"description": "Drag-and-drop sortable component for nested data and hierarchies",
"main": "./index.js",
"types": "./index.d.ts",
Expand Down Expand Up @@ -65,64 +65,65 @@
"license": "MIT",
"bugs": "https://github.com/nosferatu500/react-sortable-tree/issues",
"dependencies": {
"@nosferatu500/react-dnd-scrollzone": "^2.0.7",
"@nosferatu500/react-dnd-scrollzone": "^2.0.8",
"lodash.isequal": "^4.5.0",
"react-dnd": "14.0.4",
"react-dnd-html5-backend": "^14.1.0",
"react-virtuoso": "^2.6.0"
"react-virtuoso": "^2.8.5"
},
"devDependencies": {
"@babel/core": "^7.17.0",
"@babel/core": "^7.17.8",
"@babel/eslint-parser": "^7.17.0",
"@babel/helper-module-imports": "^7.16.7",
"@babel/plugin-transform-react-jsx": "^7.16.7",
"@babel/plugin-transform-react-jsx": "^7.17.3",
"@babel/preset-env": "^7.16.11",
"@babel/types": "^7.17.0",
"@nosferatu500/theme-file-explorer": "^3.0.15",
"@rollup/plugin-babel": "^5.3.0",
"@nosferatu500/theme-file-explorer": "^3.0.16",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.0",
"@rollup/plugin-typescript": "^8.3.1",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/addons": "^6.4.18",
"@storybook/react": "^6.4.18",
"@storybook/theming": "^6.4.18",
"@storybook/addons": "^6.4.19",
"@storybook/react": "^6.4.19",
"@storybook/theming": "^6.4.19",
"@types/babel-plugin-macros": "^2.8.5",
"@types/lodash.isequal": "^4.5.5",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"acorn-jsx": "^5.3.2",
"autoprefixer": "^10.4.2",
"autoprefixer": "^10.4.4",
"babel-plugin-macros": "^3.1.0",
"esbuild": "^0.14.20",
"eslint": "^8.8.0",
"esbuild": "^0.14.28",
"eslint": "^8.12.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-config-airbnb-typescript": "^16.1.4",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^2.7.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-sonarjs": "^0.11.0",
"eslint-plugin-unicorn": "^40.1.0",
"eslint-plugin-sonarjs": "^0.12.0",
"eslint-plugin-storybook": "^0.5.7",
"eslint-plugin-unicorn": "^41.0.1",
"json": "^11.0.0",
"postcss": "^8.4.6",
"prettier": "^2.5.1",
"postcss": "^8.4.12",
"prettier": "^2.6.1",
"prop-types": "^15.8.1",
"react": "^17.0.2",
"react-dnd-touch-backend": "^14.1.1",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"rollup": "^2.67.1",
"rollup": "^2.70.1",
"rollup-plugin-esbuild": "^4.8.2",
"rollup-plugin-postcss": "^4.0.2",
"shx": "^0.3.4",
"tslib": "^2.3.1",
"typescript": "^4.5.5"
"typescript": "^4.6.3"
},
"peerDependencies": {
"react": ">=17.0.2",
Expand Down
3 changes: 3 additions & 0 deletions src/react-sortable-tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ export type ReactSortableTreeProps = {
rowDirection?: string

debugMode?: boolean

overscan?: number | { main: number; reverse: number }
}

ReactSortableTree.defaultProps = {
Expand Down Expand Up @@ -940,6 +942,7 @@ ReactSortableTree.defaultProps = {
onlyExpandSearchedNodes: false,
rowDirection: 'ltr',
debugMode: false,
overscan: 0,
}

const SortableTreeWithoutDndContext = function (props: ReactSortableTreeProps) {
Expand Down
Loading

0 comments on commit 8b12ebb

Please sign in to comment.