Packages > @fluidframework/tree > TreeViewConfiguration

TreeViewConfiguration Class

Configuration for viewWith(config) .

Signature

/** @sealed */
export declare class TreeViewConfiguration<TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> implements Required<ITreeViewConfiguration<TSchema>>

Implements: Required<ITreeViewConfiguration <TSchema>>

Type Parameters

Parameter Constraint Default Description
TSchema ImplicitFieldSchema ImplicitFieldSchema

Constructors

Constructor Description
(constructor)(props) Constructs a new instance of the TreeViewConfiguration class

Properties

Property Modifiers Type Description
enableSchemaValidation readonly boolean If true, the tree will validate new content against its stored schema at insertion time and throw an error if the new content doesn't match the expected schema.
schema readonly TSchema The schema which the application wants to view the tree with.

Constructor Details

(constructor)

Constructs a new instance of the TreeViewConfiguration class

Signature

constructor(props: ITreeViewConfiguration<TSchema>);

Parameters

Parameter Type Description
props ITreeViewConfiguration<TSchema> Property bag of configuration options.

Property Details

enableSchemaValidation

If true, the tree will validate new content against its stored schema at insertion time and throw an error if the new content doesn’t match the expected schema.

Signature

readonly enableSchemaValidation: boolean;

Type: boolean

Remarks

Enabling schema validation has a performance penalty when inserting new content into the tree because additional checks are done. Enable this option only in scenarios where you are ok with that operation being a bit slower.

schema

The schema which the application wants to view the tree with.

Signature

readonly schema: TSchema;

Type: TSchema