comparison client/src/lib/mixins.js @ 2738:add2d47c2567

client: tables: implemented simple default sorting
author Markus Kottlaender <markus@intevation.de>
date Tue, 19 Mar 2019 18:59:40 +0100
parents
children 87d34efafb3a
comparison
equal deleted inserted replaced
2737:4a5c0e7cb75b 2738:add2d47c2567
1 /* This is Free Software under GNU Affero General Public License v >= 3.0
2 * without warranty, see README.md and license for details.
3 *
4 * SPDX-License-Identifier: AGPL-3.0-or-later
5 * License-Filename: LICENSES/AGPL-3.0.txt
6 *
7 * Copyright (C) 2018 by via donau
8 * – Österreichische Wasserstraßen-Gesellschaft mbH
9 * Software engineering by Intevation GmbH
10 *
11 * Author(s):
12 * Markus Kottländer <markus.kottlaender@intevation.de>
13 */
14
15 const sortTable = {
16 data() {
17 return {
18 sortColumn: "",
19 sortDirection: "ASC",
20 pageSize: 20,
21 page: 1
22 };
23 },
24 methods: {
25 sortTable(sorting) {
26 this.sortColumn = sorting.sortColumn;
27 this.sortDirection = sorting.sortDirection;
28 }
29 }
30 };
31
32 export { sortTable };