src/modules/generic-search/classes/search-form-component.intf.ts
Interface that must be implemented by the SearchForm component that will be used together with the Generic Search component. It defines the properties that are required and used by the Generic Search component.
Properties |
Methods |
resetSearchForm | ||||||||
resetSearchForm(searchCriteria: CriteriaType)
|
||||||||
Reset the current FormGroup instance bound to the form of the Generic Search
Parameters :
Returns :
void
|
searchForm |
searchForm:
|
Type : UntypedFormGroup
|
Reference to the FormGroup to be bound to the form of the Generic Search. This reference will also be used by the StarkGenericSearchComponent in oder to pass the form to the AbstractStarkSearchComponent to validate and reset the form. |
workingCopyChanged |
workingCopyChanged:
|
Type : EventEmitter<CriteriaType>
|
Emit the latest values of the search criteria whenever it has changed as a result of value changes in the form of the Generic Search |
import { UntypedFormGroup } from "@angular/forms";
import { EventEmitter } from "@angular/core";
/**
* Interface that must be implemented by the SearchForm component that will be used together with the Generic Search component.
* It defines the properties that are required and used by the Generic Search component.
*/
export interface StarkSearchFormComponent<CriteriaType> {
/**
* Reference to the FormGroup to be bound to the form of the Generic Search.
*
* This reference will also be used by the {@link StarkGenericSearchComponent} in oder to pass the form to the {@link AbstractStarkSearchComponent}
* to validate and reset the form.
*/
searchForm: UntypedFormGroup;
/**
* Emit the latest values of the search criteria whenever it has changed as a result of value changes in the form of the Generic Search
*/
workingCopyChanged: EventEmitter<CriteriaType>;
/**
* Create a new FormGroup instance to be bound to the form of the Generic Search
* @param searchCriteria - The search criteria containing the initial values for the form fields
*/
createSearchForm(searchCriteria: CriteriaType): UntypedFormGroup;
/**
* Reset the current FormGroup instance bound to the form of the Generic Search
* @param searchCriteria - The search criteria containing the reset values for the form fields
*/
resetSearchForm(searchCriteria: CriteriaType): void;
}