Class SearchPredicateComponent

Hierarchy

  • AbstractSearchPredicateComponent
    • SearchPredicateComponent

Constructors

Properties

_categoryFactory: CategoryFactory
_initializationService: AdvancedSearchComponentInitializationService
_logger: LoggerService
_predicateChange: Subscription
_searchCategories: Category<any>[]
_selectedCategory: Category<any>
editable: boolean

Whether the contents displayed in this component can be edited by the user or not.

Defaults to true

generator: Category<any>

Optional generator with prefilled values. Can be used to add prefilled predicate components to the search GUI.

predicate: EditableElementaryPredicate
predicateId: number
remove$: Subject<number>
renderSelection: ((option: SearchAutocompleteOption<unknown>) => string)

Lambda that is used to preserve this reference in HTML binding.

See [_renderSelection()]AbstractSearchPredicateComponent#_renderSelection for information about the transform function.

Type declaration

    • (option): string
    • Parameters

      • option: SearchAutocompleteOption<unknown>

        the SearchAutocompleteOption object that was selected in the autocomplete list.

      Returns string

ɵcmp: unknown
ɵfac: unknown

Accessors

  • set categoryInput(input): void
  • Parameters

    • input: MatSelect

    Returns void

  • get searchCategories(): Category<any>[]
  • Returns Category<any>[]

  • get selectedCategory(): Category<any>
  • Returns Category<any>

  • set selectedCategory(newCategory): void
  • Parameters

    • newCategory: Category<any>

    Returns void

Methods

  • Transforms a SearchAutocompleteOption object into it's name. Used for displaying user selection in the input field, when an autocomplete option is selected.

    Parameters

    • option: SearchAutocompleteOption<unknown>

      the object we want to transform. It might not exist if user input doesn't match any autocomplete option

    Returns string

    option name if it exists, empty string otherwise

  • Parameters

    • newCategory: Category<any>

    Returns void

  • Returns void

  • A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

    Returns void

  • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

    Returns void

  • Notifies the EditableElementaryPredicate about changes to the predicate generated by the selected Category.

    Parameters

    • newPredicate: ElementaryPredicate

      predicate generated by the selected Category

    Returns void

  • Returns void