File

src/modules/generic-search/classes/search-form-component.intf.ts

Description

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.

Index

Properties
Methods

Methods

createSearchForm
createSearchForm(searchCriteria: CriteriaType)

Create a new FormGroup instance to be bound to the form of the Generic Search

Parameters :
Name Type Optional Description
searchCriteria CriteriaType No
  • The search criteria containing the initial values for the form fields
Returns : UntypedFormGroup
resetSearchForm
resetSearchForm(searchCriteria: CriteriaType)

Reset the current FormGroup instance bound to the form of the Generic Search

Parameters :
Name Type Optional Description
searchCriteria CriteriaType No
  • The search criteria containing the reset values for the form fields
Returns : void

Properties

searchForm
searchForm: UntypedFormGroup
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: EventEmitter<CriteriaType>
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;
}

results matching ""

    No results matching ""