projects/congarevenuecloud/elements/src/lib/dependent-picklist/dependent-picklist.component.ts
Dependent picklist component displays picklist values with country and state inforamtion of user's address record.
import { DependentPicklistModule } from '@congarevenuecloud/elements';
@NgModule({
imports: [DependentPicklistModule, ...]
})
export class AppModule {}
```typescript
<apt-dependent-picklist
[(ngModel)]="myModel"
[fieldMethod]="fieldService"
[field]="stateCode"
[parentField]="countryCode"
[inline]="isInline"
[size]="inputSize"
></apt-dependent-picklist>
OnChanges
ControlValueAccessor
OnDestroy
changeDetection | ChangeDetectionStrategy.Default |
providers |
{
provide: NG_VALUE_ACCESSOR, useExisting: DependentPicklistComponent, multi: true
}
|
selector | apt-dependent-picklist |
template |
|
Properties |
Methods |
Inputs |
constructor(metadataService: MetadataService)
|
||||||
Parameters :
|
entity |
Type : AObject
|
Represents the type of the object which is an instance of AObject |
field |
Type : string
|
Field Name to be passed as string. |
inline |
Type : boolean
|
Default value : true
|
Flag to set this as an inline element. |
parentField |
Type : string
|
Parent field to be passed as string. |
size |
Type : "sm" | "md" | "lg"
|
Default value : 'md'
|
Size value to render the input. |
childChange | ||||||
childChange(evt)
|
||||||
Sets the state information selected by the user from dropdown.
Parameters :
Returns :
void
|
parentChange | ||||||
parentChange(evt)
|
||||||
Sets the country and corresponding state information selected by the user from dropdown.
Parameters :
Returns :
void
|
writeValue | ||||||
writeValue(value: [string, string])
|
||||||
Parameters :
Returns :
void
|
onChange | ||||
Sets the value property to the option selected in the dropdown. |
||||
Parameters :
|
value |
Type : [string, string]
|
Current selected value. |
view$ |
Type : BehaviorSubject<DependentPicklistView>
|
Default value : new BehaviorSubject<DependentPicklistView>(null)
|
Used to hold information for rendering the view. |