Category «Nova»

Sort by field/column of Vue JS data for Laravel Nova

<template> <divv-on:click=”$emit(‘sort-list’, 0.1)”role=”button”class=”sortable-title”> <spanclass=”title”v-html=”title”></span> <spanv-if=”order_type==’desc'”><iclass=”fa fa-arrow-circle-down”aria-hidden=”true”></i></span> <spanv-if=”order_type==’asc'”><iclass=”fa fa-arrow-circle-up”aria-hidden=”true”></i></span> <spanv-if=”order_type==null”><iclass=”fa fa-sort”aria-hidden=”true”></i></span> </div> </template> <script> export default { props: [ ‘title’, ‘order_type’, ], data() { return { // } }, mounted() { // }, methods: { // }, } </script>   Use it in the parent component: import SortableField from “./SortableField” export default { components :{ SortableField …