diff --git a/package.json b/package.json index 68c4551..ea5f5be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uoe-eng/tabularasa", - "version": "1.32.0", + "version": "1.32.1", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build --target lib --name tabularasa src/index.js", diff --git a/src/components/TRList.vue b/src/components/TRList.vue index 69d343a..abab505 100644 --- a/src/components/TRList.vue +++ b/src/components/TRList.vue @@ -130,9 +130,9 @@ const columns = computed(() => { const getUIState = () => { // Return current state of filters and sorting params let uiState = { filters: filters.value } - if (sortField.value && sortOrder.value) { - uiState['sortField'] = sortField.value - uiState['sortOrder'] = sortOrder.value + if (sortField && sortOrder) { + uiState['sortField'] = sortField + uiState['sortOrder'] = sortOrder } return uiState } @@ -163,8 +163,8 @@ const onClearFilters = () => { const onLazy = (type, event) => { // Cache sort params for getUIState if (type === 'sort') { - sortField.value = event.sortField - sortOrder.value = event.sortOrder + sortField = event.sortField + sortOrder = event.sortOrder } dtProps.value.limit = event.rows trBus.emit(`TRList:${type}:${props.name}`, event)