File

src/lib/markup-kit/collapse/collapse/collapse.component.ts

Description

Component for displaying a collapsible content.

Example of usage:

<mefdev-collapse [Disabled]="false" [Active]="true" (stateChange)="onStateChange($event)">
  <ng-template #CardTitle>
    <!-- Content for the card title -->
    <h3>Card Title</h3>
  </ng-template>

  <!-- Content for the collapsible section -->
  <div>
Content inside collapse
  </div>
</mefdev-collapse>

https://mef.dev/ui_kit_demo/view/page_components/collapse

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(_collapseSet: CollapseSetComponent, _elementRef: ElementRef)
Parameters :
Name Type Optional
_collapseSet CollapseSetComponent No
_elementRef ElementRef No

Inputs

Active
Type : boolean

Indicates whether the collapse is active or not.

Disabled
Type : boolean

Indicates whether the collapse is disabled. Set this to true to disable the collapse. Defaults to false.

Outputs

stateChange
Type : EventEmitter

Event emitter for the state change of the collapse. Emits a boolean value indicating whether the collapse is active or not.

Example:

<mefdev-collapse (stateChange)="onStateChange($event)"></mefdev-collapse>

Methods

clickHeader
clickHeader($event: MouseEvent)

Event handler for the header click event. Toggles the active state of the collapse and emits the state change event.

Parameters :
Name Type Optional Description
$event MouseEvent No

The mouse event object.

Returns : void

Properties

_active
Default value : false
_el
CardTitle
Type : TemplateRef<void>
Decorators :
@ContentChild('CardTitle')

ContentChild for the template of the card title.

Example:

<ng-template #CardTitle>
  <h3>Card Title</h3>
</ng-template>

Accessors

Disabled
getDisabled()
setDisabled(value: boolean)

Indicates whether the collapse is disabled. Set this to true to disable the collapse. Defaults to false.

Parameters :
Name Type Optional
value boolean No
Returns : void
Active
getActive()
setActive(value: boolean)

Indicates whether the collapse is active or not.

Parameters :
Name Type Optional
value boolean No
Returns : void

results matching ""

    No results matching ""