### File

`src/app/home/reducers/search.actions.ts`

### Methods

getAllFiltes
`getAllFiltes()`
Defined in src/app/home/reducers/search.actions.ts:13
Returns: `Action`

addFilter
`addFilter(taxon: any)`
Defined in src/app/home/reducers/search.actions.ts:22
Parameters : taxon Class Taxon Get's triggered on checking the checkboxes in TaxonsComponent. Returns: `Action`

removeFilter
`removeFilter(taxon: any)`
Defined in src/app/home/reducers/search.actions.ts:36
Parameters : taxon Get's triggered at 2 places:- When user unchecks the checkbox. When user clears the selected filtes in filterSummaryComponent Returns: `void`

### Properties

Static ADD_FILTER
`ADD_FILTER: `string``
Default value: `ADD_FILTER`
Defined in src/app/home/reducers/search.actions.ts:5

Static GET_ALL_FILTERS
`GET_ALL_FILTERS: `string``
Default value: `GET_ALL_FILTERS`
Defined in src/app/home/reducers/search.actions.ts:4

Static REMOVE_FILTER
`REMOVE_FILTER: `string``
Default value: `REMOVE_FILTER`
Defined in src/app/home/reducers/search.actions.ts:6

    import { Action } from '@ngrx/store';

    export class SearchActions {
        static GET_ALL_FILTERS = 'GET_ALL_FILTERS';
        static ADD_FILTER = 'ADD_FILTER';
        static REMOVE_FILTER = 'REMOVE_FILTER';

        /**
         * @method getAllFtilers
         * Fetches all the filters that have been getSelectedProduct
         * Used in filterSummaryComponent
         */
        getAllFiltes(): Action {
            return { type: SearchActions.GET_ALL_FILTERS };
        }

        /**
         * @method addFilter
         * @param taxon Class Taxon
         * Get's triggered on checking the checkboxes in TaxonsComponent.
         */
        addFilter(taxon: any): Action {
          return {
            type: SearchActions.ADD_FILTER,
            payload: taxon
          };
        }

        /**
         * @method removeFilter
         * @param taxon
         * Get's triggered at 2 places:-
         * 1. When user unchecks the checkbox.
         * 2. When user clears the selected filtes in filterSummaryComponent
         */
        removeFilter(taxon: any) {
          return {
            type: SearchActions.REMOVE_FILTER,
            payload: taxon
          };
        }
    }

# results matching ""

# No results matching ""