API Documentation

DruxtViewsFilters

views

Modules

DruxtViewsFilters

Used by the DruxtView component to render a collection of Druxt Wrapper themeable filters.

Typedefs

ComponentOptions : Array.<array>

Provides the available component naming options for the Druxt Wrapper.

PropsData : object

Provides propsData for the DruxtWrapper.

ScopedSlots : object

Provides scoped slots for use in the Wrapper component.

DruxtViewsFilters

Used by the DruxtView component to render a collection of Druxt Wrapper themeable filters.


.props

Kind: static property of DruxtViewsFilters


.filters : Array.<object>

The Exposed Filter objects.

Kind: static property of props


.options : object

The Exposed form options.

Kind: static property of props


.type : string

The Exposed form type.

Kind: static property of props


.value : object

The DruxtViewFilters model value.

Kind: static property of props


.druxt

DruxtModule settings

Kind: static property of DruxtViewsFilters


.componentOptions(context) ⇒ ComponentOptions

Provides the available component naming options for the DruxtWrapper.

Kind: static method of druxt

ParamTypeDescription
contextobjectThe module component ViewModel.

.propsData(context) ⇒ PropsData

Provides propsData for the DruxtWrapper.

Kind: static method of druxt

ParamTypeDescription
contextobjectThe module component ViewModel.

.slots() ⇒ ScopedSlots

Provides the scoped slots object for the Module render function.

A scoped slot is provided for each filter.

The default slot will render all filters.

Kind: static method of druxt
Returns: ScopedSlots - The Scoped slots object.
Example (DruxtViewsFiltersType.vue)

<template>
  <div>
    <slot name="nid" />
  </div>
</template>

ComponentOptions : Array.<array>

Provides the available component naming options for the Druxt Wrapper.

Kind: global typedef
Example

[
  'DruxtViewsFilters[Type]',
  'DruxtViewsFilters[Default]'
]

Example

[
  'DruxtViewsFiltersBasic',
  'DruxtViewsFiltersDefault'
]

PropsData : object

Provides propsData for the DruxtWrapper.

Kind: global typedef

ParamTypeDescription
filtersArray.<object>The Exposed Filter objects.
optionsobjectThe Exposed form options.
typestringThe Exposed form type.
valueobjectThe DruxtViewFilters model value.

Example

{
  filters: [{
    admin_label: '',
    expose: {},
    exposed: true,
    ...
  }],
  options: {
    expose_sort_order: true,
    exposed_sorts_label: 'Sort by',
    reset_button: false,
    ...
  },
  type: 'basic',
  value: undefined,
}

ScopedSlots : object

Provides scoped slots for use in the Wrapper component.

Kind: global typedef

ParamTypeDescription
[filter.expose.identifier]functionSlot per filter.
defaultfunctionAll filters.

Example (DruxtViewsFiltersType.vue)

<template>
  <div v-if="default">
    <slot />
  </div>

  <div v-else>
    <slot name="type" />
  </div>
</template>