TreeViewConfiguration Class
Configuration for viewWith(config). \
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export declare class TreeViewConfiguration<const 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) | Construct a new TreeViewConfiguration. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
_typeCheck | MakeNominal | ||
definitionsInternal | readonly |
ReadonlyMap<string, TreeNodeSchema> | definitions but with public types. |
enableSchemaValidation | readonly |
boolean | If true , the tree will perform additional validation of content against its stored schema and throw an error if the new content doesn't match the expected schema. |
preventAmbiguity | readonly |
boolean | A flag used to opt into strict rules ensuring that the schema avoids cases which can make the type of nodes ambiguous when importing or exporting data. |
schema | readonly |
TSchema | The schema which the application wants to view the tree with. |
Constructor Details
(constructor)
Construct a new TreeViewConfiguration.
Signature
constructor(props: ITreeViewConfiguration<TSchema>);
Remarks
Performing this construction deeply validates the provided schema. This means that when this constructor is called, all LazyItem TreeNodeSchema references will be evaluated (using evaluateLazySchema(value)). This means that the declarations for all transitively reachable TreeNodeSchema must be available at this time.
For example, a schema reachable from this configuration cannot reference this configuration during its declaration, since this would be a cyclic dependency that will cause an error when constructing this configuration.
Parameters
Parameter | Type | Description |
---|---|---|
props | ITreeViewConfiguration<TSchema> | Property bag of configuration options. |