Do the sorting within AcceptedSessionsList
This commit is contained in:
parent
15e921239e
commit
a39497e8d4
2 changed files with 11 additions and 11 deletions
vuejs/src/components
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div v-if="sessions.length" class="bg-white p-6 rounded-lg border">
|
||||
<ul class="-mb-3">
|
||||
<li v-for="{ attributes } in sessions" :key="attributes.drupal_internal__nid" class="mb-3">
|
||||
<li v-for="{ attributes } in sortedSessions" :key="attributes.drupal_internal__nid" class="mb-3">
|
||||
{{ attributes.title }}
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -13,12 +13,20 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sortBy from 'lodash/sortBy'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
sessions: {
|
||||
type: Object,
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
sortedSessions: function () {
|
||||
return sortBy(this.sessions, 'attributes.title')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue