File

src/ui/filter/smart-static-filter.component.ts

Description

The static templated version of the Smart Filter. The Smart Static Filter component allows the usage of custom templates.

Implements

ISmartFilter OnInit OnChanges

Example

Metadata

selector smart-static-filter
template
<!--
              <ng-container *ngIf="!!template">
                  <ng-template #fakeComponent dynamic-component
                      (dynamicComponentReady)="dynamicFilterReady($event)"
                      [componentModules]="componentDeps"
                      [componentContext]="self"
                      [componentTemplate]="template"
                      *ngIf="!!template">
                  </ng-template>
              </ng-container>
              -->
	

Index

Properties
Methods
Inputs
Outputs
HostListeners

Constructor

constructor(registry: SmartFilterRegistry, smartHttp: SmartHttpService, serviceAdapter: SmartServiceAdapter)
Parameters :
Name Type Optional
registry SmartFilterRegistry No
smartHttp SmartHttpService No
serviceAdapter SmartServiceAdapter No

Inputs

smart-object-name
Type : string

The name that this filter will use to register itself with the Smart Filter Registry.

smart-template
Type : string

The template URL from which to fetch this filter's template

Outputs

on-filter
Type : EventEmitter<FilterEvent>

Fires when the user presses the enter key or clicks the filter button.

HostListeners

keyup
Arguments : '$event'
keyup(ev: KeyboardEvent)

Methods

dynamicFilterReady
dynamicFilterReady(event: any)
Parameters :
Name Type Optional
event any No
Returns : void
initializeFromDataSource
initializeFromDataSource(dataSource: SmartDataSource)

Initialises the JSDO schema from the given data source

Parameters :
Name Type Optional
dataSource SmartDataSource No
Returns : void
initTemplate
initTemplate()

Fetches the HTML template and adds any necessary HTML attributes to inputs, then renders the Smart Static Filter component.

Returns : void
registerCancelButton
registerCancelButton(button: CancelButtonDirective)

Registers a cancel button with this filter

Parameters :
Name Type Optional
button CancelButtonDirective No
Returns : void
registerFilterButton
registerFilterButton(button: FilterButtonDirective)

Registers a filter button with this filter.

Parameters :
Name Type Optional
button FilterButtonDirective No
Returns : void
registerFilterOperator
registerFilterOperator(operator: ForFilterFieldDirective)

Registers a filter operator with this filter. Filter operators are any HTML elements that expose a value property.

Parameters :
Name Type Optional
operator ForFilterFieldDirective No
Returns : void
registerInputField
registerInputField(input: ForFieldDirective)

Registers a filter field with this filter. Filter fields are any HTML elements that expose a value property.

Parameters :
Name Type Optional
input ForFieldDirective No
Returns : void
removeFilters
removeFilters()

Removes all filter values.

Returns : void

Properties

componentDeps
Type : []
Default value : []
filterFields
Type : ForFieldDirective[]
Default value : []

The filter fields registered with this filter.

filterOperators
Type : any
Default value : {}

The filter operator elements registered with this filter.

self
Default value : this
template
Type : string

This filter's HTML template

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""