Migrating from v13
Breaking changes
- Exposed flow method
handleFlownow accepts a step value instead of an index and has been renamed toexecuteFlow partialinflowprop is removed, since it has no effect on the behaviour. Prop remains an object in case of potential updates@flow-stepemitted event will provide the step value instead of the step index
Change
partialproperty from the flow prop is removed, since it was used only in a specific scenario withauto-apply, which is now handled automaticallyhandleFlowis an exposed method to trigger flow again programmatically, and accepts an optional parameter to start from a specific step. Previously it used steps index to start from a specific step, which is now replaced with the step value
vue
<template>
<VueDatePicker
ref="dpRef"
:flow="{
steps: ['year', 'month', 'calendar'],
partial: true,
}"
@flow-step="onFlowStep"
/>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { VueDatePicker, type PickerSection } from '@vuepic/vue-datepicker';
const dpRef = ref();
dpRef.value?.handleFlow(1);
dpRef.value?.executeFlow('month');
function onFlowStep(stepIndex: number) {}
function onFlowStep(step: PickerSection) {}
</script>