react-arborist

The complete tree view component for React

MIT License

Downloads
161.1K
Stars
2.8K
Committers
17

Bot releases are visible (Hide)

react-arborist - Version 3.4.0 Latest Release

Published by jameskerr 10 months ago

What's Changed

This enables trees where every node can be an internal node. Many thanks to @edimov for making this happen.

Full Changelog: https://github.com/brimdata/react-arborist/compare/v3.3.1...v3.4.0

react-arborist - Version 3.3.1

Published by jameskerr 10 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v3.2.0...v3.3.1

react-arborist - Version 3.3.0 Release Candidate 1

Published by jameskerr 12 months ago

What's Changed

react-arborist - Version 3.2.0

Published by jameskerr about 1 year ago

What's Changed

Thanks to @victorvianaom, @liamdon for getting the ball rolling.

Full Changelog: https://github.com/brimdata/react-arborist/compare/v3.1.0...v3.2.0

react-arborist - Version 3.1.0

Published by jameskerr over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v3.0.2...v3.1.0

react-arborist - Version 3.0.2

Published by jameskerr over 1 year ago

The previous release introduced a bug where the <Tree> inverted the result of the disableDrop prop. For example, if you specified "true" it would allow a drop. This fixes that bug and updates the CI workflow to run unit tests and e2e tests.

What's Changed

Full Changelog: https://github.com/brimdata/react-arborist/compare/v3.0.1...v3.0.2

react-arborist - Version 3.0.1

Published by jameskerr over 1 year ago

What's Changed

This is a tiny release to fix some Typescript problems. If you upgraded to version 3.0.0 and stated seeing these typescript problems then this release will fix them.

queries-tree.tsx:85:27 - error TS2339: Property 'name' does not exist on type 'unknown'.

node.data.name.toLowerCase().includes(term.toLowerCase())

Full Changelog: https://github.com/brimdata/react-arborist/compare/v3.0.0...v3.0.1

react-arborist - Version 3.0.0

Published by jameskerr over 1 year ago

Whats Changed?

Breaking Changes

  • Tree Component disableDrop Prop Changed
  • NodeApi isDroppable Property Removed

Features

  • Disable Edit
  • Disable Drop Dynamically

Extras

  • Indent Lines in Cities Demo
  • Cypress Integration Tests
  • Removed ForwardRef Redeclare

Features

Disable Edit

The disableEdit prop was added to the tree to specify nodes that cannot be edited. This also fixed a bug when pressing the keyboard shortcut "Enter" on a node that did not render a form. The tree would get stuck in the "editing" mode and could not return to the normal mode.

Disable Drop Dynamically

The disableDrop prop now accepts a function with the arguments described below. Previously you could only provide a static list of nodes that were not droppable, but now you can determine it dynamically.

Breaking Changes

Tree Component disableDrop Prop

If you were passing a function to the disableDrop prop, you'll need to update it to use the following signature:

declare function disableDrop(args: {
  dragNodes: NodeApi[]; // The nodes being dragged
  parentNode: NodeApi; // The new parent of the dragNodes if dropped
  index: number; // The new child index of the dragNodes if dropped
}): boolean;

This lets you disallow a drop based on the items being dragged and which node you are hovering over. You might notice it matches the function signature of the onMove handler. It is still possible to pass a string or a boolean to the disableDrop prop to prevent drops statically.

NodeApi isDroppable property

The .isDroppable property has been removed from the NodeApi class. This is now determined dynamically from the tree's state. It doesn't make sense to ask an single node if it is droppable anymore.

Pull Requests

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v2.3.0...v3.0.0

react-arborist - Version 2.3.0

Published by jameskerr almost 2 years ago

What's Changed

The overscan feature can make the scrolling much smoother in some use cases. Thank you @rafma0!

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v2.2.0...v2.3.0

react-arborist - Version 2.2.0

Published by jameskerr almost 2 years ago

Happy New Year! Here's a small release with a new feature and a bug fix. Many thanks to the new contributors.

What's Changed

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v2.1.1...v2.2.0

react-arborist - Version 2.1.1

Published by jameskerr almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v2.1.0...v2.1.1

react-arborist - Version 2.1.0

Published by jameskerr almost 2 years ago

What's Changed

Add nodes as arguments to handler functions.

For example:

onDelete={(args) => {
  args.ids 
  args.nodes // The node objects that correspond to those ids.
}}

This was needed to distinguish internal nodes from leaf nodes in the delete handler.

Remove the IdObj constraint on the data and initialData props.

Previously you needed to have a string id field, but now you don't. If your id is represented by a different field, you can use the idAccessor prop.

Full Changelog: https://github.com/brimdata/react-arborist/compare/v2.0.0...v2.1.0

react-arborist - Version 2.0.0

Published by jameskerr almost 2 years ago

What's Changed

This release makes breaking changes to the Tree Props and the Node Renderer APIs. The README contains the new documentation. These changes have enabled many new features and bug fixes such as:

Full Changelog: https://github.com/brimdata/react-arborist/compare/v1.2.0...v2.0.0

react-arborist - Version 2 Release Candidate 2

Published by jameskerr almost 2 years ago

react-arborist - Version 2 Release Candidate

Published by jameskerr almost 2 years ago

react-arborist - Version 1.2.0

Published by jameskerr about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v1.1.0...v1.2.0

Demo of Custom Drop Cursor

XiY95GUW9e

react-arborist - Version 1.1.0

Published by jameskerr over 2 years ago

react-arborist - Version 1.0.4

Published by jameskerr over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/brimdata/react-arborist/compare/v1.0.3...v1.0.4

react-arborist - v1.0.3

Published by jameskerr over 2 years ago

A small release to update the homepage site to the demo.

react-arborist - Version 1.0.2

Published by jameskerr over 2 years ago