-
Notifications
You must be signed in to change notification settings - Fork 0
ff_tree_select
thkle edited this page Jan 10, 2018
·
1 revision
-
data
- Must be a collection.
- dataLabelCallback
-
sortData
- default: true
- If true, sort() will be called on the input collection and the collections returned by getChildrenCallback. Checks if a comparator is set on the collection.
-
sortDataCallback
- Use this if no comparator is set or if you'd like to use a custom sort/comarator method. If set, collection.sort() will NOT be called.
-
getDataCallback
- If set, data will be ignored. Must return a collection.
-
hideChildren
- default: false
- If set, although a children callback is set, no children will be displayed.
-
getChildrenCallback
- Must return a collection or undefined.
-
getParentCallback
- Return the parent node of the passed node. Needed for fast filtering and minimalized checkbox mode.
-
valueLabelCallback
- If set, this will be called to get the label for this view's value.
-
enableNoSelection
- default: false
- If set, a "no selection" - option will be prepended to the dropout. Selecting this option will reset value to undefined.
-
enableDeselect
- default: false
- If set, clicking a selected node will deselect it.
-
noSelectionLabel
- default: 'keine Auswahl'
-
selectableRoots
- default: true
- If true, roots can be selected. If false, roots can not be selected if they have children.
-
highlightSelectedNode
- default: true
- If true, nodes will be highlighted visually when selected.
-
nodeIsSelectableCallback
- Use this to determine selection possibility for each single node. Params: node, this.
-
nodeContentView
- DEPRECATED. if set, this view will be used to display a node's content.
-
nodeContentViewData
- DEPRECATED. Additional data for the custom nodeContentView.
-
getNodeContentCallback
- Use this to pass custom DOM to the node's content element. Params: node, currentFilterValue, this.
-
multiselect
- default: false
- If true, value will be a collection containing all selected nodes.
-
valueLabelSeparator
- default: ', '
-
checkboxesEnabled
- default: false
- If true, all nodes are rendered with a checkbox. nodeContentView still can be passed and will act as a content view inside. getParentCallback mus be set.
-
nodeStateChangeCallback
- Params: node, allAffectedNodes, state, this. Called when a node has changed its state. Also passes an array containing all nodes that have changed their status accordingly.
-
getNodeStateCallback
- Params: node
-
setNodeStateCallback
- Params: node, state, auto (true if this node's state was set because another node's state was set)
-
getCheckedNodesCallback
- Should return all checked nodes.
-
checkedNodes
- Array(!) of all nodes that are checked. Remember to set minimalizedCheckedNodes correctly!
-
minimalizedCheckedNodes
- default: true
- TODO: false-mode. Atm checkedNodes will always be minimalized! ... Set this to true when minimalized check nodes are used (e.g. if all children are checked, only the parent will be stored). Requires getParentCallback to be set.
-
syncCheckboxStates
- default: true
- If true, value will contain all checked nodes (ignores multiselect state and acts like multiselect).
-
filterEnabled
- default: false
- If true, the treeselect can be filtered by typing into the value field. Nodes will be filtered by their label.
-
filterMinimumCharacters
- default: 0
- Number of characters needed to filter.
-
filterIsRequired
- default: false
- If true, the treeSelect will only render nodes when the data is filtered. Handy for large collections.
-
filterDidChangeCallback
- Triggered on the live change callback of the built in input field.
-
dataLabelForFilterCallback
- If set, this will be invoked to get a nodes label for filtering. Handy for deep hierarchy filtering, for example.
-
deepFilterEnabled
- default: true
- If true and filterEnabled is true, the built in filter will also search child nodes if there are any.
-
preserveOpenNodes
- default: true
- If true, nodes that are open will be reopenend when something was typed into the filter input field.
-
filterSetsValue
- default: false
- If true and the filter differs from the treeSelect selection, the filter value will set this view's value. getValue() and changeCallbacks might return a string instead of a model then. Check with view.valueIsTreeNode().
-
valueSetsFilter
- default: true
- If false, the value field will not apply the selected node's label. Handy, for example, when the value field should only act as a search input when the dropout is always open.
-
selectFilterTextOnFilterFocus
- default: false
- If true, the text in the value field will be selected. Ignored if filterEnabled is false.
-
filterDebounceWait
- default: 50 (ms)
-
preventFastFilter
- default: false
- If true, all nodes will be filtered at once, not on demand.
-
filterCallback
- If not set, filtering will be done by the built filter function which uses dataLabelCallback(). Return BOOL.
-
filterValueCallback
- If a custom filterCallback is used, also implement this callback to pass the current filter value! Params: this.
-
applyFilterOnOpen
- default: false
- If true, any current filter will be applied when opening the treeSelect.
-
alwaysOpen
- default: false
- If true, there will be nothing to drop out. The treeSelect will alway be visible.
-
autoClose
- default: false
-
closeDelay
- default: 750 (ms)
-
clickClose
- default: true
- Will be ignored when alwaysOpen and/or multiselect is active.
-
preventWheelBubbling
- default: true
- Used for JSListView.
-
useNativeTreeSelectIfPossible
- default: true