This package has been deprecated

Author message:

This package has been deprecated in favor of @itwin/tree-widget-react

@bentley/tree-widget-react
TypeScript icon, indicating that this package has built-in type declarations

1.4.6 • Public • Published

@bentley/tree-widget-react

Copyright © Bentley Systems, Incorporated. All rights reserved.

The tree-widget-react package provides a UiProvider class - TreeWidgetUiItemsProvider - which can be passed into the uiProviders prop of the iTwin Viewer's <Viewer /> component to provide access to the following features:

  • Spatial Containment Tree

  • Models Tree

  • Categories Tree

The package also provides the underlying component - TreeWidgetComponent - which you can wrap within your own custom UiProvider and pass in your own custom trees to display.

Sample usage

Initializing TreeWidget before using the TreeWidgetUiItemsProvider is required

const handleOnIModelAppInit = async () => {
    await TreeWidget.initialize(IModelApp.i18n);
  };

<Viewer
  ...
  onIModelAppInit={handleOnIModelAppInit}
  uiProviders={[new TreeWidgetUiItemsProvider(props)]}
/>

/@bentley/tree-widget-react/

    Package Sidebar

    Install

    npm i @bentley/tree-widget-react

    Weekly Downloads

    15

    Version

    1.4.6

    License

    MIT

    Unpacked Size

    199 kB

    Total Files

    59

    Last publish

    Collaborators

    • aruniverse
    • colinkerr
    • cshafer
    • imodeljs
    • wgoehrig