Do the sorting within AcceptedSessionsList
This commit is contained in:
parent
15e921239e
commit
a39497e8d4
2 changed files with 11 additions and 11 deletions
|
@ -1,14 +1,13 @@
|
|||
<template>
|
||||
<div id="app" class="antialiased min-h-screen font-sans bg-gray-100 text-black p-12">
|
||||
<div class="w-full max-w-2xl mx-auto">
|
||||
<accepted-sessions-list :sessions="sortedSessions" />
|
||||
<accepted-sessions-list :sessions="sessions" />
|
||||
<session-form @submitted="addSession($event)" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import qs from 'qs'
|
||||
import AcceptedSessionsList from '@/components/AcceptedSessionsList'
|
||||
import SessionForm from '@/components/SessionForm'
|
||||
|
@ -47,13 +46,6 @@ export default {
|
|||
addSession: function (session) {
|
||||
this.sessions.push(session)
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
sortedSessions: function () {
|
||||
return _(this.sessions).sortBy(({ attributes }) => attributes.title)
|
||||
.value()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue