1) Fix sort/filter dialog editing issue. Fixes #3558.

2) Fix sort/filter dialog issue where it incorrectly requires ASC/DESC. Fixes #3325.
This commit is contained in:
Aditya Toshniwal
2018-08-21 13:05:40 +05:30
committed by Akshay Joshi
parent 46d4bf027d
commit 57660d131f
6 changed files with 14 additions and 12 deletions

View File

@@ -304,8 +304,12 @@ define('pgadmin.datagrid', [
matchBrackets: self.preferences.brace_matching,
});
let sql_font_size = sqlEditorUtils.calcFontSize(self.preferences.sql_font_size);
$(this.filter_obj.getWrapperElement()).css('font-size', sql_font_size);
setTimeout(function() {
// Set focus on editor
that.filter_obj.refresh();
that.filter_obj.focus();
}, 500);
},

View File

@@ -425,12 +425,10 @@ class GridCommand(BaseCommand, SQLFilter, FetchedRowTracker):
"""
This function gets the order required for primary keys
"""
if self.cmd_type in (VIEW_FIRST_100_ROWS, VIEW_ALL_ROWS):
return 'asc'
elif self.cmd_type == VIEW_LAST_100_ROWS:
if self.cmd_type == VIEW_LAST_100_ROWS:
return 'desc'
else:
return None
return 'asc'
class TableCommand(GridCommand):