Constructor
# new FieldsetComponent()
This component provides a sophisticated fieldset container that automatically adapts its behavior based on CRUD operations. It integrates seamlessly with Ionic's accordion components to create expandable/collapsible sections for organizing form content and related information. The component intelligently determines its initial state based on the operation type, opening automatically for READ and DELETE operations while remaining closed for CREATE and UPDATE operations.
Dynamic fieldset component with collapsible accordion functionality.
sequenceDiagram
participant U as User
participant F as FieldsetComponent
participant I as Ionic Accordion
participant D as DOM
F->>F: ngAfterViewInit()
alt operation is READ or DELETE
F->>F: Set isOpen = true
F->>D: Query accordion element
F->>I: Set value attribute to 'open'
F->>F: Trigger change detection
end
U->>I: Click accordion header
I->>F: handleChange(event)
F->>F: Update isOpen state
F->>I: Reflect new state
Example
```html
<!-- Basic usage with automatic state management -->
<ngx-decaf-fieldset
name="Personal Information"
[operation]="OperationKeys.READ"
target="_self">
<ion-input label="Name" placeholder="Enter name"></ion-input>
<ion-input label="Email" type="email" placeholder="Enter email"></ion-input>
</ngx-decaf-fieldset>
<!-- Advanced usage with custom operation -->
<ngx-decaf-fieldset
name="Contact Details"
[operation]="currentOperation"
target="_blank">
<!-- Complex form fields -->
</ngx-decaf-fieldset>
```