@minecraft/server-editor
    Preparing search index...

    Interface ICollectionTreePropertyItemBeta

    A property item which supports creating nested folders of collection items

    interface ICollectionTreePropertyItem {
        canDragDropEntries: boolean;
        enable: boolean;
        folderCount: number;
        id: string;
        paneId: string;
        typeName: PropertyItemType;
        viewControlPane: IListViewControlPane | undefined;
        viewSortType: CollectionTreeSortType;
        visible: boolean;
        addFolder(options: ICollectionTreeFolderOptions): ICollectionTreeFolder;
        buildViewControl(
            options: ICollectionTreeViewControlPaneOptions,
        ): IListViewControlPane;
        forEachFolder(callback: (folder: ICollectionTreeFolder) => boolean): void;
        getFolder(id: string): ICollectionTreeFolder | undefined;
        removeFolder(id: string): boolean;
        setCanDragDropEntries(enabled: boolean): void;
        setViewSortType(sortType: CollectionTreeSortType | undefined): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    canDragDropEntries: boolean

    Drag and drop support for the entries

    enable: boolean

    If the item is enabled in the UI.

    folderCount: number

    Count of the child folders

    id: string

    Unique ID for the property item.

    paneId: string

    The parent pane id.

    The type name of the target property.

    viewControlPane: IListViewControlPane | undefined

    View control pane for the collection tree

    Sort type for the folders.

    visible: boolean

    If the item should be visible in the UI.

    Methods

    • Beta

      Parameters

      Returns void

      Iterates over the first layer of folders

    • Beta

      Parameters

      • id: string

        Identifier of the folder

      Returns ICollectionTreeFolder | undefined

      Find the folder with the id if it exists at the root

    • Beta

      Parameters

      • id: string

        Identifier of the folder

      Returns boolean

      Removes the folder with the id if it exists at the root

    • Beta

      Parameters

      • enabled: boolean

        Whether to enable drag and drop

      Returns void

      Toggles drag and drop support for the entries

    • Beta

      Parameters

      Returns void

      Updates the folder sort type for the whole view