console: sort filter and sort column options alphabetically, close #9966

GITHUB_PR_NUMBER: 9967
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/9967

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10453
Co-authored-by: Bert Verhelst <1710840+bertyhell@users.noreply.github.com>
GitOrigin-RevId: 21c8429e32ac9e7e2cf70bc3b8dd3c93ca6ce5cb
This commit is contained in:
hasura-bot 2023-12-22 16:14:31 +05:30
parent 469f993920
commit 4ba35c33ee
2 changed files with 16 additions and 12 deletions

View File

@ -52,7 +52,9 @@ export const FilterRows = ({
onRemove?.();
};
const columnOptions: SelectItem[] = columns.map(column => {
const columnOptions: SelectItem[] = columns
.sort((a, b) => (a.name > b.name ? 1 : -1))
.map(column => {
return {
label: column.name,
value: column.name,

View File

@ -32,7 +32,9 @@ export const SortRows = ({
}
}, [initialSorts?.length]);
const columnOptions: SelectItem[] = columns.map(column => {
const columnOptions: SelectItem[] = columns
.sort((a, b) => (a.name > b.name ? 1 : -1))
.map(column => {
return {
label: column.name,
value: column.name,