Skip to content
Snippets Groups Projects
Commit 99bec9bc authored by Timothee P's avatar Timothee P :sunflower:
Browse files

WIP: getting ordering into url

parent c393899e
No related branches found
No related tags found
2 merge requests!2132.3.2-rc1,!198REDMINE_ISSUE-12567
...@@ -153,7 +153,6 @@ ...@@ -153,7 +153,6 @@
> >
</td> </td>
<td class="center"> <td class="center">
<!-- |date:'Ymd' -->
{{ feature.properties.updated_on }} {{ feature.properties.updated_on }}
</td> </td>
<td class="center" v-if="user"> <td class="center" v-if="user">
...@@ -187,7 +186,7 @@ ...@@ -187,7 +186,7 @@
class="dataTables_paginate paging_simple_numbers" class="dataTables_paginate paging_simple_numbers"
> >
<a <a
@click="$emit('update:page', 'previous');" @click="$emit('update:page', 'previous')"
id="table-features_previous" id="table-features_previous"
:class="[ :class="[
'paginate_button previous', 'paginate_button previous',
...@@ -223,7 +222,7 @@ ...@@ -223,7 +222,7 @@
aria-controls="table-features" aria-controls="table-features"
data-dt-idx="7" data-dt-idx="7"
tabindex="0" tabindex="0"
@click="$emit('update:page', 'next');" @click="$emit('update:page', 'next')"
>Suivant</a >Suivant</a
> >
</div> </div>
...@@ -347,6 +346,10 @@ export default { ...@@ -347,6 +346,10 @@ export default {
this.sort.column = column; this.sort.column = column;
this.sort.ascending = true; this.sort.ascending = true;
} }
this.$emit(
"update:sort",
`${this.sort.ascending ? "-" : ""}${this.sort.column}`
);
}, },
}, },
}; };
......
...@@ -142,6 +142,7 @@ ...@@ -142,6 +142,7 @@
<FeatureListTable <FeatureListTable
v-show="!showMap" v-show="!showMap"
v-on:update:page="handlePageChange" v-on:update:page="handlePageChange"
v-on:update:sort="handleSortChange"
:geojsonFeatures="geojsonFeaturesPaginated" :geojsonFeatures="geojsonFeaturesPaginated"
:checkedFeatures.sync="checkedFeatures" :checkedFeatures.sync="checkedFeatures"
:featuresCount="featuresCount" :featuresCount="featuresCount"
...@@ -619,6 +620,10 @@ export default { ...@@ -619,6 +620,10 @@ export default {
} }
}, },
handleSortChange(ordering) {
console.log("ORDERING", ordering)
},
toPage(pageNumber) { toPage(pageNumber) {
const toAddOrRemove = const toAddOrRemove =
(pageNumber - this.pagination.currentPage) * this.pagination.pagesize; (pageNumber - this.pagination.currentPage) * this.pagination.pagesize;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment