Skip to content

Commit

Permalink
Ordered Schema Names
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasp authored and Paxa committed Apr 1, 2021
1 parent c8c1669 commit b83d81a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/db_screen_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ class DbScreenView {
'SEQUENCE': 'Sequence'
};

$u.each(data, (schema, tables) => {
Object.keys(data).sort((a, b) => {
// preserve public shema as first always
if (a > b || b === 'public') return 1;
if (a < b) return -1;
return 0;
}).forEach((schema) => {
var schemaTree = DOMinate(['li', ['span', schema], {'schema-name': schema}, ['ul$list']]);
if (schema == 'public') $u(schemaTree[0]).addClass('open');

Expand Down

0 comments on commit b83d81a

Please sign in to comment.