FlexberryTreenodeComponent Class
addon/components/flexberry-treenode.js:42
Flexberry tree node component with Semantic UI accordion style. Component must be used in combination with flexberry-tree component as a wrapper for those tree nodes, which are placed on the same tree level.
Usage: templates/my-form.hbs
Item Index
Methods
- _actionHandlerIsDefined
- _addDynamicProperty
- _dynamicPropertiesDidChange
- _hasContentDidChange
- _removeDynamicProperties
- _removeDynamicProperty
- actions.onHeaderClick
- attachEventHandler
- closeModalDialog
- createdModalDialog
- detachAllEventHandlers
- detachEventHandler
- send
- sendingActions.beforeCollapse
- sendingActions.beforeExpand
- sendingActions.headerClick
Methods
_actionHandlerIsDefined
-
options
Parameters:
Returns:
_addDynamicProperty
-
propertyName
Parameters:
-
propertyName
StringName of dynamic property that must be added.
_dynamicPropertiesDidChange
()
private
_hasContentDidChange
()
private
Observes changes in '_hasContent' flag, and collapses node if '_hasContent' became false.
_removeDynamicProperties
()
private
_removeDynamicProperty
-
propertyName
Parameters:
-
propertyName
StringName of dynamic property that must be removed.
actions.onHeaderClick
-
[jQuery event object]
Handles tree node header's 'click' event. Prevents 'click' event from bubbling for leaf nodes. Invokes component's 'headerClick' action. Invokes component's 'beforeExpand' action. Invokes component's 'beforeCollapse' action.
Parameters:
-
[jQuery event object]
Object optional(http://api.jquery.com/category/events/event-object/) which describes Inner header element's 'click' event.
attachEventHandler
-
options
Parameters:
-
options
ObjectMethod options.-
eventTarget
ObjectDOM-element (jQuery-object) for which event-handler must be attached.
-
eventName
StringEvent name.
-
eventHandler
FunctionEvent handler.
-
closeModalDialog
()
createdModalDialog
-
modalDialog
Parameters:
-
modalDialog
JQueryCreated modal window.
detachAllEventHandlers
()
detachEventHandler
-
options
Parameters:
-
options
ObjectMethod options.-
eventTarget
ObjectDOM-element (jQuery-object) from which event-handler must be detached.
-
eventName
StringEvent name.
-
eventHandler
FunctionEvent handler.
-
send
-
actionName
-
args
`
Parameters:
-
actionName
StringName of the action that must be triggered. -
args
Arguments that must be passed to action.
Returns:
sendingActions.beforeCollapse
-
e
Component's action invoking before node will be collapsed. Node can be prevented from being collapsed with call to action event object's 'originalEvent.stopPropagation()'.
Parameters:
-
e
ObjectAction's event object.
-
originalEvent
ObjectjQuery event object which describes event that triggers node's collapsing.
-
sendingActions.beforeExpand
-
e
Component's action invoking before node will be expanded. Node can be prevented from being expanded with call to action event object's 'originalEvent.stopPropagation()'.
Parameters:
-
e
ObjectAction's event object.
-
originalEvent
ObjectjQuery event object which describes event that triggers node's expanding.
-
sendingActions.headerClick
-
e
Component's action invoking when tree node's header has been clicked.
Parameters:
-
e
ObjectAction's event object.
-
originalEvent
ObjectjQuery event object which describes event that triggers this action.
-
Properties
_availableDomEvents
Object
private
_componentWrapperIsAvailable
Boolean
private
_dynamicActions
Object
private
_dynamicPropertiesMetadata
Object[]
private
Default: null
_eventsMetadata
Object[]
private
Default: null
_hasContent
Boolean
private
Flag: indicates whether some nested content is defined (some yield markup or {{#crossLink "FlexberryTreenodeComponent/nodes:property"}}'nodes'{{/childNodes}} are defined).
_hasNodes
Boolean
private
Flag: indicates whether some {{#crossLink "FlexberryTreenodeComponent/nodes:property"}}tree 'nodes'{{/childNodes}} are defined.
_openedModalDialog
JQuery
Default: undefined
_requiredActions
String[]
Default: null
classNames
String[]
Component's wrapping
Any other CSS-class names can be added through component's 'class' property.
Default: ['flexberry-treenode']
dynamicActions
DynamicActionObject[]
Default: null
dynamicProperties
Object
Default: null
flexberryClassNames
Object
static
Component's CSS-classes names. JSON-object containing string constants with CSS-classes names related to component's hbs-markup elements.
Sub-properties:
-
prefix
StringComponent's CSS-class names prefix ('flexberry-treenode').
-
wrapper
StringComponent's wrapping
CSS-class name ('flexberry-treenode').header
StringComponent's header
CSS-class name ('flexberry-treenode-header').content
StringComponent's content
CSS-class name ('flexberry-treenode-content').expandCollapseIcon
StringComponent's expand/collapse icon CSS-class name ('flexberry-treenode-expand-collapse-icon').
preventExpandCollapse
StringComponent's CSS-class name to prevent nodes expand/collapse animation ('flexberry-treenode-prevent-expand-collapse').
BooleanisTagless
Flag: indicates whether component is tagless or not (has empty [tagName](https://emberjs.com/api/ember/release/classes/Component#property_tagName) or not).
FlexberryTreenodeObjectnodes
Child nodes. This property is optional and must be used when there are too many child nodes, and you don't want to define them explicitly in the .hbs markup, then you can define nodes array somewhere in code & pass defined array to this component's property.
Default: null