Usage
Signature:
interface CAccordionItemMultipleElement<K extends string | number>
Generic Parameters
Parameter Description K Type extends string or number
Typescript Import Format
//To typecheck the element APIs, import as below.
import { CAccordionItemMultipleElement } from "oj-c/accordion-item-multiple";
//For the transpiled javascript to load the element's module, import as below
import "oj-c/accordion-item-multiple";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Slots
JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.
-
Default
-
The content node to be expanded or collapsed. Place any content to be shown/hidden inside this property.
-
header
-
Item's header. If not specified, the header contains only an open/close icon. The header text is required for accessibility purposes.
Attributes
-
disabled :boolean
-
Disables the item if set to true.
Names
Item Name Property disabledProperty change event disabledChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-disabled-changed -
expanded-keys* :Array<K>
-
Specifies the expandedKeys property. Use
expandedKeysto control which items are expanded. Bind this property to an observable array in your ViewModel (e.g.,ko.ObservableArray<string>) to programmatically expand/collapse items.- Supports writeback:
true
Names
Item Name Property expandedKeysProperty change event expandedKeysChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-expanded-keys-changed -
icon-position :"end"|"start"
-
Changes chevron icon placement at the end of the collapsible header.
Names
Item Name Property iconPositionProperty change event iconPositionChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-icon-position-changed -
item-key :K
-
Specifies the item key of each AccordionItemMultiple. Use
itemKeyto uniquely identify each item in the accordion.Names
Item Name Property itemKeyProperty change event itemKeyChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-item-key-changed
Events
-
ojCollapse
-
Note: The event detail contains the following properties: oj-c.AccordionItemMultiple.AccordionItemMultipleDetail<K>
Triggered after the item has been collapsed (after animation completes).See Events and Listeners for additional information.
-
ojExpand
-
Note: The event detail contains the following properties: oj-c.AccordionItemMultiple.AccordionItemMultipleDetail<K>
Triggered after the item has been expanded (after animation completes).See Events and Listeners for additional information.
Methods
-
getProperty(property) : {any}
-
Retrieves the value of a property or a subproperty.
Parameters:
Name Type Description propertystring The property name to get. Supports dot notation for subproperty access. Returns:
- Type
- any
-
setProperties(properties) : {void}
-
Performs a batch set of properties.
Parameters:
Name Type Description propertiesobject An object containing the property and value pairs to set. Returns:
- Type
- void
-
setProperty(property, value) : {void}
-
Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a corresponding event.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. valueany The new value to set the property to. Returns:
- Type
- void
Type Definitions
Documentation-only Types
Note: Type definitions in this section have been provided for documentation purposes and cannot be imported into application code.
-
AccordionItemMultipleDetail<K extends string | number>
-
Payload for the onOjCollapse event and onOjExpand event.
All of the event payloads listed below can be found under
event.detail. See Events and Listeners for additional information.Name Type Description from Array<K> | undefined The keys of the items that were previously expanded. to Array<K> | null The keys of the items that are now expanded. Properties:
Name Type Argument fromKeysArray<K> <optional>
toKeysArray<K> | null