Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TrivialTreeComboBoxConfig<E>

Type parameters

  • E

Hierarchy

Index

Properties

Optional allowFreeText

allowFreeText: boolean

Whether or not to allow free text to be entered by the user.

default

false

Optional animationDuration

animationDuration: number

Animation duration in milliseconds for expand and collapse animations.

Optional autoComplete

autoComplete: boolean

Whether or not to provide auto-completion.

default

true

Optional autoCompleteDelay

autoCompleteDelay: number

The number of milliseconds to wait until auto-completion is performed.

default

0

Optional autoCompleteFunction

autoCompleteFunction: function

Generates an autocompletion string for the current input of the user and currently highlighted entry in the dropdown.

param

the current text input from the user

param

the currently highlighted entry in the dropdown

returns

The full string (not only the completion part) to apply for auto-completion.

default

best effort implementation using entry properties

Type declaration

    • (editorText: string, entry: E): string
    • Parameters

      • editorText: string
      • entry: E

      Returns string

Optional childrenProperty

childrenProperty: string

Property used to retrieve the children of a node.

Note: This is subject to being replaced by a function in future versions.

default

'children'

Optional editingMode

editingMode: EditingMode

Optional enforceSingleExpandedPath

enforceSingleExpandedPath: boolean

Special mode that allows only one path to be expanded. Expands all ancestor nodes of the selected node, as well as the selected node itself. Collapses all others.

Optional entries

entries: E[]

The initial list of suggested entries.

Optional entryRenderingFunction

entryRenderingFunction: function

Rendering function used to display a suggested entry (i.e. an entry displayed in the dropdown).

param
param

the depth of the entry in the tree

returns

HTML string

default

Using the image2LinesTemplate from TrivialCore.

Type declaration

    • (entry: E, depth: number): string
    • Parameters

      • entry: E
      • depth: number

      Returns string

Optional entryToEditorTextFunction

entryToEditorTextFunction: function

Similar to autoCompleteFunction. Used to set the editor's text when focusing the component.

default

entry["displayValue"]

Type declaration

    • (entry: E): string
    • Parameters

      • entry: E

      Returns string

Optional expandOnSelection

expandOnSelection: boolean

Whether or not to expand a node when it is selected.

Optional expandedProperty

expandedProperty: string

Property used to determine whether a node is expanded or not.

Note: This is subject to being replaced by a function in future versions.

default

'expanded'

Optional freeTextEntryFactory

freeTextEntryFactory: function

Creates an entry (object) from a string entered by the user.

param

the text entered by the user

default

{ displayValue: freeText, _isFreeTextEntry: true }

Type declaration

    • (freeText: string): E | any
    • Parameters

      • freeText: string

      Returns E | any

Optional lazyChildrenFlagProperty

lazyChildrenFlagProperty: string

Property used to determine whether a node has children that need to be lazy-loaded.

Note: This is subject to being replaced by a function in future versions.

default

'hasLazyChildren'

Optional lazyChildrenQueryFunction

lazyChildrenQueryFunction: function

Function for retrieving children of a node.

param
param

Type declaration

Optional matchingOptions

matchingOptions: MatchingOptions

Used for highlighting suggested entries. Also used by the default filtering functions int TrivialCore.

default

{ matchingMode: 'contains', ignoreCase: true, maxLevenshteinDistance: 1 }

Optional noEntriesTemplate

noEntriesTemplate: string

Html string defining what to display when the list of results from the queryFunction is empty.

Optional queryFunction

queryFunction: QueryFunction<E>

Used to retrieve the entries ("suggestions") to be displayed in the dropdown box.

see

QueryFunction

default

creates a client-side query function using the provided entries

Optional selectedEntry

selectedEntry: E

Initially selected entry.

default

null

Optional selectedEntryId

selectedEntryId: any

The ID of the initially selected entry in the tree.

Note: This option is subject to change!

Optional selectedEntryRenderingFunction

selectedEntryRenderingFunction: RenderingFunction<E>

Rendering function used to display a selected entry (i.e. an entry inside the editor area of the component, not the dropdown).

param
returns

HTML string

default

wrapWithDefaultTagWrapper(entryRenderingFunction(entry))

Optional showClearButton

showClearButton: boolean

The clear button is a the small 'x' at the right of the entry display that can be clicked to clear the selection.

Optional showDropDownOnResultsOnly

showDropDownOnResultsOnly: boolean

It true, opening the dropdown will be delayed until the result callback of the queryFunction is called.

default

false

Optional showExpanders

showExpanders: boolean

Whether or not to show the expander controls for parent nodes.

Optional showTrigger

showTrigger: boolean

The trigger is the button on the right side of the component that can be clicket to open the dropdown.

default

true

Optional spinnerTemplate

spinnerTemplate: string

HTML string defining the spinner to be displayed while entries are being retrieved.

Optional textHighlightingEntryLimit

textHighlightingEntryLimit: number

Performance setting. Defines the maximum number of entries until which text highlighting is performed. Set to 0 to disable text highlighting.

default

100

Optional valueFunction

valueFunction: function

Calculates the value to set on the original input.

param

the selected entry

returns

the string to set as the value of the original input

Type declaration

    • (entry: E): string
    • Parameters

      • entry: E

      Returns string

Generated using TypeDoc