Skip to main content
Version: v2

TreeViewProps Interface

React props for viewing a tree.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/react/alpha.

For more information about our API support guarantees, see here.

Input

This type is "input," meaning that code outside of the library defining it should not read from it. Future versions of this type may add optional members or make typing of members more general.

Signature​

export interface TreeViewProps<TSchema extends ImplicitFieldSchema>

Type Parameters​

ParameterConstraintDescription
TSchemaImplicitFieldSchema

Properties​

PropertyAlertsModifiersDefault ValueTypeDescription
errorComponentAlphaoptional, readonlyComponent which describes the situation (in English) and allows the user to upgrade the schema to match the TreeViewConfiguration if possible.FC<SchemaIncompatibleProps>Component to display instead of the viewComponent when tree content is not compatible with the TreeViewConfiguration.
viewComponentAlphareadonlyFC<{ root: PropTreeValue<TreeFieldFromImplicitField<TSchema>>; }>Component to display the tree content.

Property Details​

errorComponent​

Component to display instead of the viewComponent when tree content is not compatible with the TreeViewConfiguration.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

readonly errorComponent?: FC<SchemaIncompatibleProps>;

Type: FC<SchemaIncompatibleProps>

viewComponent​

Component to display the tree content.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

readonly viewComponent: FC<{
root: PropTreeValue<TreeFieldFromImplicitField<TSchema>>;
}>;

Type: FC<{ root: PropTreeValue<TreeFieldFromImplicitField<TSchema>>; }>