File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const categories = computed<Category[]>(() => transactionStore.categories);
4949const accounts = computed <Account []>(() => accountStore .accounts );
5050const trTemplateCount = ref <number >(0 );
5151
52- const sort = ref (filterHelper .initSort ());
52+ const sort = ref (filterHelper .initSort (" txn_date " ));
5353const filterStorageIndex = ref (apiPrefix + " -filters" );
5454const filters = ref (JSON .parse (localStorage .getItem (filterStorageIndex .value ) ?? " []" ));
5555const filterOverlayRef = ref <any >(null );
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ const makeGroupKey = (f: FilterObj): Key => `${f.source}::${f.field}::${f.operat
66const makeValueKey = ( f : FilterObj ) : Key => `${ makeGroupKey ( f ) } ::${ JSON . stringify ( f . value ) } ` ;
77
88const filterHelper = {
9- initSort ( ) {
9+ initSort ( field : string = "" ) {
10+ if ( field === "" )
11+ field = "created_at"
12+
1013 return {
1114 order : - 1 ,
12- field : 'created_at'
15+ field : field
1316 } ;
1417 } ,
1518 toggleSort ( sortValue : number ) : number {
You can’t perform that action at this time.
0 commit comments