From 98428bf8c23fb22629e273faa36bab3734fa7e4b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 8 May 2019 15:37:03 -0500 Subject: [PATCH] Fix sorting info bug when Buefy grid doesn't support it --- tailbone/templates/grids/buefy.mako | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tailbone/templates/grids/buefy.mako b/tailbone/templates/grids/buefy.mako index 39984551..b56ddcae 100644 --- a/tailbone/templates/grids/buefy.mako +++ b/tailbone/templates/grids/buefy.mako @@ -165,12 +165,15 @@ return { data: ${json.dumps(grid_data['data'])|n}, loading: false, - sortField: '${grid.sortkey}', - sortOrder: '${grid.sortdir}', rowStatusMap: ${json.dumps(grid_data['row_status_map'])|n}, ## TODO: should be dumping json from server here checkedRows: [], + % if grid.sortable: + sortField: '${grid.sortkey}', + sortOrder: '${grid.sortdir}', + % endif + % if grid.pageable: % if static_data: total: ${len(grid_data['data'])},