File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -623,6 +623,11 @@ This path string points to the logo used in the UI header/sidebar and in emails
623623
624624This array allows you to globally hide specific sidebar sections for all users, regardless of their preferences.
625625
626+ ### client.tables
627+ <!-- Title: Default Table Sort -->
628+
629+ This object allows you to set default sort preferences for all the sortable tables in the UI.
630+
626631### client.items_per_page
627632<!-- Title: List Items Per Page -->
628633
Original file line number Diff line number Diff line change @@ -3679,8 +3679,8 @@ Page.Base = class Base extends Page {
36793679 var html = '' ;
36803680 if ( ! this . tables ) this . tables = { } ;
36813681
3682- opts . sort_by = app . getPref ( `tables.${ opts . id } .sort_by` ) || opts . sort_by ;
3683- opts . sort_dir = app . getPref ( `tables.${ opts . id } .sort_dir` ) || opts . sort_dir ;
3682+ opts . sort_by = app . getPref ( `tables.${ opts . id } .sort_by` ) || get_path ( config , `tables. ${ opts . id } .sort_by` ) || opts . sort_by ;
3683+ opts . sort_dir = app . getPref ( `tables.${ opts . id } .sort_dir` ) || get_path ( config , `tables. ${ opts . id } .sort_dir` ) || opts . sort_dir ;
36843684
36853685 // retrieve previous settings if applicable
36863686 if ( this . tables [ opts . id ] ) {
Original file line number Diff line number Diff line change 272272 "company" : " PixlCore LLC" ,
273273 "logo_url" : " /images/logotype.png" ,
274274 "hide_sidebar_sections" : [],
275+ "tables" : {},
275276
276277 "items_per_page" : 50 ,
277278 "alt_items_per_page" : 25 ,
You can’t perform that action at this time.
0 commit comments