API Documentation
DruxtViewsFilters
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
Array.<object>
.filters : The Exposed Filter objects.
Kind: static property of props
object
.options : The Exposed form options.
Kind: static property of props
string
.type : The Exposed form type.
Kind: static property of props
object
.value : The DruxtViewFilters model value.
Kind: static property of props
.langcode
The resource langcode.
Kind: static property of props
Example
<DruxtViewsFilters langcode="en" />
.v-model
The module component model value.
Used to bypass the Drupal JSON:API fetch, setting the module data directly.
Kind: static property of props
Example
<DruxtViewsFilters v-model="{ foo: bar }" />
.wrapper
The wrapper component configuration.
Used to set the wrapper component, class, style and propsData.
Kind: static property of props
Example
<DruxtViewsFilters
:wrapper="{
component: 'MyWrapper',
class: 'wrapper',
propsData: { foo: 'bar' }
}"
/>
.druxt
DruxtModule settings
Kind: static property of DruxtViewsFilters
.template
Druxt development template tool configuration.
Kind: static property of druxt
ComponentOptions
.componentOptions(context) ⇒ Provides the available component naming options for the DruxtWrapper.
Kind: static method of druxt
Param | Type | Description |
---|---|---|
context | object | The module component ViewModel. |
PropsData
.propsData(context) ⇒ Provides propsData for the DruxtWrapper.
Kind: static method of druxt
Param | Type | Description |
---|---|---|
context | object | The module component ViewModel. |
ScopedSlots
.slots() ⇒ 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>
Array.<array>
ComponentOptions : Provides the available component naming options for the Druxt Wrapper.
Kind: global typedef
Example
[
'DruxtViewsFilters[Type][Langcode]',
'DruxtViewsFilters[Type]',
'DruxtViewsFilters[Default][Langcode]'
'DruxtViewsFilters[Default]'
]
Example
[
'DruxtViewsFiltersBasicEn',
'DruxtViewsFiltersBasic',
'DruxtViewsFiltersDefaultEn'
'DruxtViewsFiltersDefault'
]
object
PropsData : Provides propsData for the DruxtWrapper.
Kind: global typedef
Param | Type | Description |
---|---|---|
filters | Array.<object> | The Exposed Filter objects. |
options | object | The Exposed form options. |
type | string | The Exposed form type. |
value | object | The 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,
}
object
ScopedSlots : Provides scoped slots for use in the Wrapper component.
Kind: global typedef
Param | Type | Description |
---|---|---|
[filter.expose.identifier] | function | Slot per filter. |
default | function | All filters. |
Example (DruxtViewsFiltersType.vue)
<template>
<div v-if="default">
<slot />
</div>
<div v-else>
<slot name="type" />
</div>
</template>