Restore custom events to Request List

This commit is contained in:
Daniel J. Summers 2020-03-07 17:59:15 -06:00
parent 3c65f836e3
commit 3b28adf64b

View File

@ -11,7 +11,7 @@ md-table(md-card)
</template>
<script lang="ts">
import { createComponent } from '@vue/composition-api'
import { createComponent, onMounted } from '@vue/composition-api'
import RequestListItem from './RequestListItem.vue'
@ -30,9 +30,11 @@ export default createComponent({
}
},
setup (props, { parent }) {
// TODO: custom events
// this.$on('requestUnsnoozed', parent.$emit('requestUnsnoozed'))
// this.$on('requestNowShown', parent.$emit('requestNowShown'))
// TODO: custom events; does this work?
onMounted(function () {
this.$on('requestUnsnoozed', parent.$emit('requestUnsnoozed'))
this.$on('requestNowShown', parent.$emit('requestNowShown'))
})
return {
title: props.title,
requests: props.requests as JournalRequest[]