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

    1.4.5 • 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)]}
    />

    Install

    npm i @bentley/tree-widget-react

    DownloadsWeekly Downloads

    388

    Version

    1.4.5

    License

    MIT

    Unpacked Size

    199 kB

    Total Files

    59

    Last publish

    Collaborators

    • cshafer
    • philip-mcgraw
    • colinkerr
    • imodeljs