Browse Source

fix(admin-ui): General custom field tab always frist

Michael Bromley 4 years ago
parent
commit
873526d52e

+ 1 - 1
packages/admin-ui/src/lib/core/src/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.ts

@@ -41,7 +41,7 @@ export class TabbedCustomFieldsComponent implements OnInit {
             }
         }
         return Array.from(tabMap.entries())
-            .sort((a, b) => (a[0] < b[0] ? -1 : 1))
+            .sort((a, b) => (a[0] === this.defaultTabName ? -1 : 1))
             .map(([tabName, customFields]) => ({ tabName, customFields }));
     }
 }