UNPKG

@marciocamello/react-sortable-tree

Version:

Drag-and-drop sortable component for nested data and hierarchies

378 lines (198 loc) 16 kB
# Changelog 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 ## 4.0.0-beta.1 * Migrate to TS (partially) * Node >= 14 * Drop IE from support list * Replace react-virtualized with react-virtuoso * Replace theme package by own theme package * Bump deps ## 3.0.5 * Bump deps ## 3.0.4 ### Bug Fixes * Take CSP style nonce as props, pass to react-virtualized AutoSizer ([5476ff6](https://github.com/nosferatu500/react-sortable-tree/commit/5476ff60b7ba2b5198af76f8656ee40679d53303)) * Bump deps ## [2.8.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.7.1...v2.8.0) (2020-08-10) ### Features * adding FUNDING.yml ([8e87804](https://github.com/frontend-collective/react-sortable-tree/commit/8e87804195fcc6cfc98ac0c8ae3a6f8511c05898)) * remove current codesandbox website ([30749c7](https://github.com/frontend-collective/react-sortable-tree/commit/30749c74deba9b254c674bc0ded4fe2e6eb4cdce)) ### Bug Fixes * accidentally deleted own styling ([c664ade](https://github.com/frontend-collective/react-sortable-tree/commit/c664adee1cc045a76a9f89c38b644aa996f38365)) * don't prettify changelog ([8615412](https://github.com/frontend-collective/react-sortable-tree/commit/86154120b0814a72ad45b23b4a24f45f2bbac225)) * open collective link ([d55561e](https://github.com/frontend-collective/react-sortable-tree/commit/d55561e91b6abc7268be261c55c95a1fac5627e9)) * remove outdated links from readme ([7a07263](https://github.com/frontend-collective/react-sortable-tree/commit/7a07263719044709ea177cd7d59ed0c0d56e86d0)) * scroll to search focused tree item ([#756](https://github.com/frontend-collective/react-sortable-tree/issues/756)) ([e528a4c](https://github.com/frontend-collective/react-sortable-tree/commit/e528a4c6167cf64a6c0ff43caf22be45cccb21e3)) * set themes using new api ([c2c1075](https://github.com/frontend-collective/react-sortable-tree/commit/c2c1075dfab844412f375174697ab30692b6055b)) * site ([95cb249](https://github.com/frontend-collective/react-sortable-tree/commit/95cb249e24fb8cab2134567f71447bd728228c1e)) * website imports ([8e7f83d](https://github.com/frontend-collective/react-sortable-tree/commit/8e7f83dc483c4697edd5ae29080316cf68de248a)) * website pt 2 ([6914959](https://github.com/frontend-collective/react-sortable-tree/commit/69149596c884cb28c83c17f238c7d7d186271c44)) <a name="2.7.1"></a> ## [2.7.1](https://github.com/frontend-collective/react-sortable-tree/compare/v2.7.0...v2.7.1) (2019-11-12) <a name="2.7.0"></a> # [2.7.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.6.2...v2.7.0) (2019-10-14) ### Features * update react-dnd ([#531](https://github.com/frontend-collective/react-sortable-tree/issues/531)) ([c449524](https://github.com/frontend-collective/react-sortable-tree/commit/c449524)) <a name="2.6.2"></a> ## [2.6.2](https://github.com/frontend-collective/react-sortable-tree/compare/v2.6.1...v2.6.2) (2019-03-21) ### Bug Fixes * Using DragDropContextConsumer directly ([#466](https://github.com/frontend-collective/react-sortable-tree/issues/466)) ([7bc9995](https://github.com/frontend-collective/react-sortable-tree/commit/7bc9995)) <a name="2.6.1"></a> ## [2.6.1](https://github.com/frontend-collective/react-sortable-tree/compare/v2.6.0...v2.6.1) (2019-03-19) <a name="2.6.0"></a> # [2.6.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.5.0...v2.6.0) (2018-12-11) ### Bug Fixes * Bundling patched version of react-dnd-scrollzone ([#432](https://github.com/frontend-collective/react-sortable-tree/issues/432)) ([4017a08](https://github.com/frontend-collective/react-sortable-tree/commit/4017a08)) <a name="2.5.0"></a> # [2.5.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.4.0...v2.5.0) (2018-12-10) ### Bug Fixes * postinstall -> prepare ([#430](https://github.com/frontend-collective/react-sortable-tree/issues/430)) ([5f94ace](https://github.com/frontend-collective/react-sortable-tree/commit/5f94ace)) * rollup external dependencies ([7b8afd4](https://github.com/frontend-collective/react-sortable-tree/commit/7b8afd4)) <a name="2.4.0"></a> # [2.4.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.3.0...v2.4.0) (2018-12-10) <a name="2.3.0"></a> # [2.3.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.2.0...v2.3.0) (2018-10-23) ### Bug Fixes * deploy storybook to main site. fix links ([599f2ed](https://github.com/frontend-collective/react-sortable-tree/commit/599f2ed)) * propagate the expanded treeData to editor ([bd0df92](https://github.com/frontend-collective/react-sortable-tree/commit/bd0df92)) * update links to new website ([d68c3bf](https://github.com/frontend-collective/react-sortable-tree/commit/d68c3bf)) * update props link + added PRs welcome badge ([c83c2aa](https://github.com/frontend-collective/react-sortable-tree/commit/c83c2aa)) * update screenshot tests ([4977cb1](https://github.com/frontend-collective/react-sortable-tree/commit/4977cb1)) ### Features * add storybook for onlyExpandSearchedNode prop ([#354](https://github.com/frontend-collective/react-sortable-tree/issues/354)) ([c4a41d1](https://github.com/frontend-collective/react-sortable-tree/commit/c4a41d1)) <a name="2.2.0"></a> # [2.2.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.1.2...v2.2.0) (2018-06-12) ### Bug Fixes * correct link to react-virtualized props ([#349](https://github.com/frontend-collective/react-sortable-tree/issues/349)) ([46961ed](https://github.com/frontend-collective/react-sortable-tree/commit/46961ed)) * remove the extra s on style.css ([#342](https://github.com/frontend-collective/react-sortable-tree/issues/342)) ([77451bc](https://github.com/frontend-collective/react-sortable-tree/commit/77451bc)) ### Features * commonjs, es6, umd build supports ([#327](https://github.com/frontend-collective/react-sortable-tree/issues/327)) ([6556e4d](https://github.com/frontend-collective/react-sortable-tree/commit/6556e4d)) * NEW DOCS + SITE ([#343](https://github.com/frontend-collective/react-sortable-tree/issues/343)) ([176b8c3](https://github.com/frontend-collective/react-sortable-tree/commit/176b8c3)) * Only serve cjs and esm builds ([#351](https://github.com/frontend-collective/react-sortable-tree/issues/351)) ([2c01832](https://github.com/frontend-collective/react-sortable-tree/commit/2c01832)) * row direction support ([#337](https://github.com/frontend-collective/react-sortable-tree/issues/337)) ([5bef44b](https://github.com/frontend-collective/react-sortable-tree/commit/5bef44b)) <a name="2.1.2"></a> ## [2.1.2](https://github.com/frontend-collective/react-sortable-tree/compare/v2.1.1...v2.1.2) (2018-05-23) ### Bug Fixes * prettier ([#313](https://github.com/frontend-collective/react-sortable-tree/issues/313)) ([3456076](https://github.com/frontend-collective/react-sortable-tree/commit/3456076)) <a name="2.1.1"></a> ## [2.1.1](https://github.com/frontend-collective/react-sortable-tree/compare/v2.1.0...v2.1.1) (2018-04-29) <a name="2.1.0"></a> # [2.1.0](https://github.com/frontend-collective/react-sortable-tree/compare/v2.0.1...v2.1.0) (2018-03-04) ### Features * Added onlyExpandSearchedNodes prop ([2d57928](https://github.com/frontend-collective/react-sortable-tree/commit/2d57928)), closes [#245](https://github.com/frontend-collective/react-sortable-tree/issues/245) <a name="2.0.1"></a> ## [2.0.1](https://github.com/frontend-collective/react-sortable-tree/compare/v2.0.0...v2.0.1) (2018-02-10) ### Bug Fixes * restore highlight line appearance ([2c95205](https://github.com/frontend-collective/react-sortable-tree/commit/2c95205)) <a name="2.0.0"></a> # [2.0.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.8.1...v2.0.0) (2018-02-10) ### BREAKING CHANGES * from v2.0.0 on, you must import the css for the component yourself, using `import 'react-sortable-tree/style.css';`. You only need to do this once in your application. * Support dropped for IE versions earlier than IE 11 <a name="1.8.1"></a> ## [1.8.1](https://github.com/frontend-collective/react-sortable-tree/compare/v1.8.0...v1.8.1) (2018-01-21) ### Bug Fixes * rename parentNode callback param to nextParentNode ([24bf39d](https://github.com/frontend-collective/react-sortable-tree/commit/24bf39d)) <a name="1.8.0"></a> # [1.8.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.7.0...v1.8.0) (2018-01-21) ### Features * Parent node in onMoveNode callback ([537c6a4](https://github.com/frontend-collective/react-sortable-tree/commit/537c6a4)) <a name="1.7.0"></a> # [1.7.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.6.0...v1.7.0) (2018-01-16) ### Features * add onDragStateChanged callback ([2caa9d1](https://github.com/frontend-collective/react-sortable-tree/commit/2caa9d1)) onDragStateChanged is called when dragging begins and ends, so you can easily track the current state of dragging.<br /> Thanks to [@wuweiweiwu](https://github.com/wuweiweiwu) for the contribution! <a name="1.6.0"></a> # [1.6.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.5.5...v1.6.0) (2018-01-14) ### Features * add more parameters to rowHeight. Fixes [#199](https://github.com/frontend-collective/react-sortable-tree/issues/199) ([8ff0ff2](https://github.com/frontend-collective/react-sortable-tree/commit/8ff0ff2)) Thanks to [@wuweiweiwu](https://github.com/wuweiweiwu) for the contribution! <a name="1.5.5"></a> ## [1.5.5](https://github.com/frontend-collective/react-sortable-tree/compare/v1.5.4...v1.5.5) (2018-01-13) ### Bug Fixes * expand tree for searches on initial mount. fixes [#223](https://github.com/frontend-collective/react-sortable-tree/issues/223) ([64a984a](https://github.com/frontend-collective/react-sortable-tree/commit/64a984a)) <a name="1.5.4"></a> ## [1.5.4](https://github.com/frontend-collective/react-sortable-tree/compare/v1.5.3...v1.5.4) (2018-01-07) ### Bug Fixes * UglifyJS enabled to remove dead code, which had been causing issues with some builds. If the presence of UglifyJS causes issues in your production builds, please refer to https://github.com/frontend-collective/react-sortable-tree#if-it-throws-typeerror-fn-is-not-a-function-errors-in-production <a name="1.5.3"></a> ## [1.5.3](https://github.com/frontend-collective/react-sortable-tree/compare/v1.5.2...v1.5.3) (2017-12-09) ### Bug Fixes * dragging past the bottom of the tree no longer slows down rendering ([3ce35f3](https://github.com/frontend-collective/react-sortable-tree/commit/3ce35f3)) <a name="1.5.2"></a> ## [1.5.2](https://github.com/frontend-collective/react-sortable-tree/compare/v1.5.1...v1.5.2) (2017-11-28) ### Bug Fixes * correct positioning of full-width draggable rows ([00396d1](https://github.com/frontend-collective/react-sortable-tree/commit/00396d1)) <a name="1.5.1"></a> ## [1.5.1](https://github.com/frontend-collective/react-sortable-tree/compare/v1.5.0...v1.5.1) (2017-11-28) ### Bug Fixes * prevent slowdown caused by invalid targetDepth when using maxDepth ([c21d4de](https://github.com/frontend-collective/react-sortable-tree/commit/c21d4de)), closes [#194](https://github.com/frontend-collective/react-sortable-tree/issues/194) <a name="1.5.0"></a> # [1.5.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.4.0...v1.5.0) (2017-10-29) ### Bug Fixes * Fix oblong collapse/expand button appearance on mobile safari ([62dfdec](https://github.com/frontend-collective/react-sortable-tree/commit/62dfdec)) ### Features * enable the use of themes for simplified appearance customization ([d07c6a7](https://github.com/frontend-collective/react-sortable-tree/commit/d07c6a7)) <a name="1.4.0"></a> # [1.4.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.3.1...v1.4.0) (2017-10-13) ### Features * Add path argument to onVisibilityToggle callback ([25cd134](https://github.com/frontend-collective/react-sortable-tree/commit/25cd134)) <a name="1.3.1"></a> ## [1.3.1](https://github.com/frontend-collective/react-sortable-tree/compare/v1.3.0...v1.3.1) (2017-10-03) ### Bug Fixes * Allow react[@16](https://github.com/16) ([9a31a03](https://github.com/frontend-collective/react-sortable-tree/commit/9a31a03)) <a name="1.3.0"></a> # [1.3.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.2.2...v1.3.0) (2017-09-20) ### Features * Provide more row parameters in rowHeight callback ([1b88b18](https://github.com/frontend-collective/react-sortable-tree/commit/1b88b18)) <a name="1.2.2"></a> ## [1.2.2](https://github.com/frontend-collective/react-sortable-tree/compare/v1.2.1...v1.2.2) (2017-09-12) ### Bug Fixes * Specify version of react-dnd-html5-backend to avoid invalid package installs ([a09b611](https://github.com/frontend-collective/react-sortable-tree/commit/a09b611)) <a name="1.2.1"></a> ## [1.2.1](https://github.com/frontend-collective/react-sortable-tree/compare/v1.2.0...v1.2.1) (2017-09-06) ### Bug Fixes * Allow children function in default renderer ([6f1dcac](https://github.com/frontend-collective/react-sortable-tree/commit/6f1dcac)) <a name="1.2.0"></a> # [1.2.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.1.1...v1.2.0) (2017-08-12) ### Features * Add `shouldCopyOnOutsideDrop` prop to enable copying of nodes that leave the tree ([d6a9be9](https://github.com/frontend-collective/react-sortable-tree/commit/d6a9be9)) <a name="1.1.1"></a> ## [1.1.1](https://github.com/frontend-collective/react-sortable-tree/compare/v1.1.0...v1.1.1) (2017-08-06) ### Bug Fixes * **tree-to-tree:** Fix node depth when dragging between trees ([323ccad](https://github.com/frontend-collective/react-sortable-tree/commit/323ccad)) <a name="1.1.0"></a> # [1.1.0](https://github.com/frontend-collective/react-sortable-tree/compare/v1.0.0...v1.1.0) (2017-08-05) ### Features * **node-renderer:** Make title and subtitle insertable via props ([fff72c6](https://github.com/frontend-collective/react-sortable-tree/commit/fff72c6)) <a name="1.0.0"></a> # [1.0.0](https://github.com/frontend-collective/react-sortable-tree/compare/v0.1.21...v1.0.0) (2017-08-05) ### Bug Fixes * External node offset was shifted ([d1ae0eb](https://github.com/frontend-collective/react-sortable-tree/commit/d1ae0eb)) ### Code Refactoring * get rid of `dndWrapExternalSource` api ([d103e9f](https://github.com/frontend-collective/react-sortable-tree/commit/d103e9f)) ### Features * **tree-to-tree:** Enable tree-to-tree drag-and-drop ([6986a23](https://github.com/frontend-collective/react-sortable-tree/commit/6986a23)) * Display droppable placeholder element when tree is empty ([2cd371c](https://github.com/frontend-collective/react-sortable-tree/commit/2cd371c)) * Add `prevPath` and `prevTreeIndex` to the `onMoveNode` callback ([6986a23](https://github.com/frontend-collective/react-sortable-tree/commit/6986a23)) ### BREAKING CHANGES * Trees that are empty now display a placeholder element in their place instead of being simply empty. * `dndWrapExternalSource` api no longer exists. You can achieve the same functionality and more with react-dnd APIs, as demonstrated in the storybook example. <a name="0.1.21"></a> ## [0.1.21](https://github.com/frontend-collective/react-sortable-tree/compare/v0.1.20...v0.1.21) (2017-07-15) ### Bug Fixes * Remove console.log left in after development ([da27c47](https://github.com/frontend-collective/react-sortable-tree/commit/da27c47)) See the GitHub [Releases](https://github.com/frontend-collective/react-sortable-tree/releases) for information on updates.