invoiceninja/resources/js/src/components/util/VuetableMultiSelect.vue
David Bomba cc53d08b4d
Bulk Actions (#2606)
* Wired up Bulk Archive / Delete / Restore button with reactivity on checkbox actions

* Working on POSTing bulk actions

* Working on Filtering by status

* Add Action Entity

* Implement Vuex for state management

* Implement Vuex storage & list view bulk actions

* Clean up console logs

* Configure entity list views server side
2019-01-19 21:35:21 +11:00

46 lines
922 B
Vue

<template>
<div style="width:300px;">
<multiselect v-model="value"
:options="options"
:multiple="true"
:placeholder="trans('texts.status')"
:preselect-first="true"
@input="onChange"
></multiselect>
</div>
</template>
<script lang="ts">
import Multiselect from 'vue-multiselect'
export default {
components: { Multiselect },
data () {
return {
value : [],
options: ['active', 'archived', 'deleted']
}
},
methods: {
onChange (value) {
this.$store.commit('client_list/setStatusArray', value)
this.$events.fire('multi-select', '')
if (value.indexOf('Reset me!') !== -1) this.value = []
},
onSelect (option) {
if (option === 'Disable me!') this.isDisabled = true
}
}
}
</script>
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>
<style>
</style>