Sorting
Demo
Description
Usage
<script setup lang="ts">
import { type Column, Filters, Formatters, OperatorType, SlickgridVue, SortDirection } from 'slickgrid-vue';
import { onBeforeMount, type Ref } from 'vue';
const gridOptions = ref<GridOption>();
const columnDefinitions: Ref<Column[]> = ref([]);
const dataset = ref<any[]>([]);
onBeforeMount(() => {
defineGrid();
});
function defineGrid() {
columnDefinitions.value = [
{ id: 'title', name: 'Title', field: 'title', sortable: true },
{ id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true, type: 'number' },
{ id: '%', name: '% Complete', field: 'percentComplete', sortable: true, type: 'float'},
{ id: 'start', name: 'Start', field: 'start', sortable: true, type: 'dateIso' },
{ id: 'finish', name: 'Finish', field: 'finish', sortable: true, type: 'dateIso' },
{ id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven', sortable: true }
];
}
</script>How to Sort Complex Objects?
Custom Sort Comparer
Update Sorting Dynamically
Dynamic Query Field
Sorting Dates
Pre-Parse Date Columns for better perf
Last updated