The Coral.Shell.Help component is a standardized help menu designed to fit into the
Shell 3 pattern. The menu typical contains links that are instances of Coral.Shell.Help.Item.
Coral.Shell.Help API
Constructor
JavaScript:
-
new Coral.Shell.Help()ordocument.createElement('coral-shell-help') HTML Tag:
-
<coral-shell-help>
Extends
Sub-components
Instance Properties
-
instance.hidden {Boolean}
Reflected -
- Inherited From:
- Default Value:
- false
- HTML Attribute:
- hidden
-
instance.interaction {String}
-
- Inherited From:
Properties:
Name Type Value Description ON String on Keyboard interaction is enabled. OFF String off Keyboard interaction is disabled. -
instance.items {Coral.Collection}
Readonly -
-
instance.placeholder {String}
-
- Default Value:
- ""
- HTML Attribute:
- placeholder
Whether this component is hidden or not.
Boolean enumeration for List keyboard interaction state.
The item collection.
See Coral.Collection for more details.
The search field placeholder.
Methods
-
Coral.Shell.Help.showError
-
-
Coral.Shell.Help.showResults
-
- Parameters:
-
Name Type Description results Array.<Coral.Shell.Help~result> A set of search result objects. total Number The total number of results. allResultsURL String The URL at which all results will be displayed.
-
instance.get
-
- Parameters:
-
Name Type Description property String The name of the property to fetch the value of. - Returns:
-
Property value. {*}
- Inherited From:
-
instance.hide
-
- Returns:
-
this, chainable {Coral.Component}
- Inherited From:
-
instance.off
-
- Parameters:
-
Name Type Optional Description eventName String No
The event name to stop listening for. selector String Yes
The selector that was used for event delegation. func function No
The function that was passed to on().useCapture Boolean Yes
Only remove listeners with useCaptureset to the value passed in. - Returns:
-
this, chainable. {Coral.Component}
- Inherited From:
-
instance.on
-
- Parameters:
-
Name Type Optional Default Description eventName String No
The event name to listen for. selector String Yes
The selector to use for event delegation. func function No
The function that will be called when the event is triggered. useCapture Boolean Yes
Whether or not to listen during the capturing or bubbling phase. - Returns:
-
this, chainable. {Coral.Component}
- Inherited From:
-
instance.remove
-
- Inherited From:
-
instance.set
-
- Parameters:
-
Name Type Description property String The name of the property to set. value * The value to set the property to. silent Boolean If true, events should not be triggered as a result of this set. - Returns:
-
this, chainable. {Coral.Component}
- Inherited From:
-
instance.show
-
- Returns:
-
this, chainable {Coral.Component}
- Inherited From:
-
instance.trigger
-
- Parameters:
-
Name Type Optional Default Description eventName String No
The event name to trigger. props Object Yes
Additional properties to make available to handlers as event.detail.bubbles Boolean Yes
Set to falseto prevent the event from bubbling.cancelable Boolean Yes
Set to falseto prevent the event from being cancelable. - Returns:
-
CustomEvent object {CustomEvent}
- Inherited From:
Indicate to the user that an error has occurred
Show a set of search results.
Get the value of a property.
Hide this component.
Remove an event listener.
Add an event listener.
Non-destructively remove this element. It can be re-added by simply appending it to the document again.
It will be garbage collected if there are no more references to it.
Set a single property.
Show this component.
Trigger an event.
Type Definitions
-
result
-
Properties:
Name Type Description title String The title of the search result. href String The URL of the search result. target String This property specifies where to display the search result. Use this property only if the href property is present. tags Array.<String> A set of tags associated with the search result.
A search result object.
Events
-
coral-component:attached
-
- Callback Parameters:
-
Name Type Description event Object Event object.
- Inherited From:
- Deprecated:
- since 1.14.0, use
MutationObserverinstead.
- since 1.14.0, use
-
coral-component:detached
-
- Callback Parameters:
-
Name Type Description event Object Event object.
- Inherited From:
- Deprecated:
- since 1.14.0, use
MutationObserverinstead.
- since 1.14.0, use
-
coral-component:ready
-
- Callback Parameters:
-
Name Type Description event Object Event object.
- Inherited From:
- Deprecated:
- since 1.9.0, use
Coral.commons.ready()instead.
- since 1.9.0, use
-
coral-shell-help:search
-
- Callback Parameters:
-
Name Type Description event Object Event object.
Name Type Description event.detail.value HTMLElement The user-provided input value aka the search-term
Triggered when the component is attached to the DOM.
Triggered when the component is detached to the DOM.
Triggerred when the component has been upgraded and is ready for use.
Triggered when the user submits a search term