Parameters:
| Name |
Type |
Description |
id |
String
|
The id of the component. |
properties |
Object
|
HTMLElement
|
The properties used to initialize the component or the container element. |
- Mixes In:
Returns:
An instance of the component.
-
Type
-
Object
Extends
Classes
- Trigger
Members
arrowless :Boolean
Gets or sets a value indicating if the direction arrow styles should be applied.
Type:
boxId :String|null
Gets or sets the clientid of the tooltip box.
Type:
cssClassBox :String
Gets or sets the css class of the tooltip box.
Type:
hideDelay :Number
Gets or sets the time in ms before the tooltip is hidden.
Type:
selectableTooltipContent :Boolean
Gets or sets a value indicating if tooltip content is selectable, which means that the tooltip will remain visible on a pointer enter/click event.
Type:
showDelay :Number
Gets or sets the time in ms before the tooltip is displayed.
Type:
showOnBlur :Boolean
Gets or sets a value indicating if the tooltip is shown on a blur event.
Type:
showOnFocus :Boolean
Gets or sets a value indicating if the tooltip is shown on a focus event.
Type:
Gets or sets a value which defines on which pointer event the tooltip is shown.
Type:
singleBoxInstance :Boolean
Gets or sets a value indicating if a single box instance is used to display tooltips (defaults to true). When set to false multiple tooltips can be visible at the same time. Only set to false when required because a single instance has less overhead.
Type:
visibleDuration :Number|null
Gets or sets the time in ms that tooltips remains visible (0 to keep visible).
Type:
(static, readonly) PointerEventOption :number
Type:
Properties:
| Name |
Type |
Description |
NONE |
number
|
|
ENTER |
number
|
|
DOWN |
number
|
|
CONTEXT |
number
|
|
Methods
activeTriggerId(tooltipIdopt) → {String|HTMLElement}
Gets the active trigger id.
Parameters:
| Name |
Type |
Attributes |
Description |
tooltipId |
String
|
<optional>
|
Id of the tooltip template. |
Returns:
-
Type
-
String
|
HTMLElement
Parameters:
| Name |
Type |
Description |
id |
String
|
Id of the tooltip template. |
content |
HTMLElement
|
Array.<HTMLElement>
|
DocumentFragment
|
String
|
Template content. |
cloneable |
Boolean
|
Defines if the template can be cloned for multiple views. |
addTrigger(triggerId, tooltipId, showOnPointerEvent, showOnFocus, showOnBlur)
Parameters:
| Name |
Type |
Description |
triggerId |
String
|
HTMLElement
|
The trigger element or element id that triggers the tooltip display. |
tooltipId |
String
|
The id of the tooltip template. |
showOnPointerEvent |
componyx.UI.TooltipManager.PointerEventOption
|
Gets or sets a value which defines on which pointer event the tooltip is shown. |
showOnFocus |
Boolean
|
Sets a value indicating if the tooltip is shown on a focus event. |
showOnBlur |
Boolean
|
Sets a value indicating if the tooltip is shown on a blur event. |
allowHide(valueopt)
Sets a value indicating if tooltip hiding is allowed.
Parameters:
| Name |
Type |
Attributes |
Description |
value |
Boolean
|
<optional>
|
A value indicating if tooltip hiding is allowed. |
destroy()
- See:
-
Gets the instance of the Box component used to display the tooltips.
Parameters:
| Name |
Type |
Attributes |
Description |
tooltipId |
String
|
<optional>
|
Id of the tooltip template. |
Returns:
The Box component used to display the tooltips.
-
Type
-
componyx.UI.Box
Parameters:
| Name |
Type |
Attributes |
Description |
instant |
Boolean
|
<optional>
|
A value indicating if the tooltip should be hidden instantly without animation. |
Hides the tooltip with the specified triggerId.
Parameters:
| Name |
Type |
Attributes |
Description |
triggerId |
String
|
<optional>
|
The trigger element or element id that triggered the tooltip. When a value is provided the tooltip is hidden only if current trigger id matches the specified value. |
instant |
Boolean
|
<optional>
|
A value indicating if the tooltip should be hidden instantly without animation. |
Removes a tooltip template.
Parameters:
| Name |
Type |
Default |
Description |
id |
String
|
|
Id of the tooltip template. |
keepTriggers |
Boolean
|
false
|
A value indicating if the tooltip triggers should be kept. |
removeTrigger(triggerId)
Removes a tooltip trigger.
Parameters:
| Name |
Type |
Description |
triggerId |
String
|
HTMLElement
|
The trigger element or element id that triggers the tooltip display. |
render()
Shows the tooltip with the specified triggerId.
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
triggerId |
String
|
HTMLElement
|
|
|
The trigger element or element id that triggers the tooltip display. |
fromPointerDown |
Boolean
|
<optional>
|
false
|
Set to true when called from a pointerdown handler, so the tooltip is not hidden by the pointerdown on the document that follows. |
suppressNextChangeEvent(action)
Suppresses any change events fired by the underlying input element during the execution of the provided action. Use this when programmatically setting a component value to prevent the change event from propagating as a user interaction.
The suppression is automatically lifted after the action completes, even if it throws.
Parameters:
| Name |
Type |
Description |
action |
function
|
The action to execute with change events suppressed. |
- Mixes In: