Skip to content

Commit 2771a20

Browse files
committed
Sort config properties alphabetically when not using config categories
Closes #1688
1 parent 79e97f2 commit 2771a20

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/views/ASFConfig.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
122122
return { description, ...fields[key], ...(extendedFields[key] || []) };
123123
});
124+
125+
// Sort the config properties alphabetically to make them easier to find when not using config categories
126+
if (!this.displayCategories) this.fields = this.fields.sort((a, b) => a.paramName.localeCompare(b.paramName));
124127
} catch (err) {
125128
this.$error(err.message);
126129
} finally {

src/views/modals/BotConfig.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
125125
return { description, ...fields[key], ...(extendedFields[key] || []) };
126126
});
127+
128+
// Sort the config properties alphabetically to make them easier to find when not using config categories
129+
if (!this.displayCategories) this.fields = this.fields.sort((a, b) => a.paramName.localeCompare(b.paramName));
127130
} catch (err) {
128131
this.$error(err.message);
129132
} finally {

0 commit comments

Comments
 (0)