<1 min read

RenderlessExtraParam

RenderlessExtraParam

It emits a ExtraParamsXEvents.UserChangedExtraParams when the updateValue is called.

Props

Name Description Type Default
name The extra param's name. string

Slots

Name Description Bindings
(name - type - description)
default

Examples

Renders default slot content. It binds to the default slot the name of the extra parameter and the default value of it.

Basic usage

<template>
  <RenderlessExtraParam #default="{ value, updateValue }" name="store">
    <BaseDropdown @change="updateValue" :value="value" :items="items" />
  </RenderlessExtraParam>
</template>
<script>
  import { RenderlessExtraParams } from '@empathyco/x-components/extra-params';
  import { BaseDropdown } from '@empathyco/x-components';
  export default {
    name: 'RenderlessExtraParamsDemo',
    components: {
      RenderlessExtraParams,
      BaseDropdown
    },
    props: ['name'],
    data() {
      return {
        items: ['spain', 'portugal']
      };
    }
  };
</script>