mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
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:
parent
469f993920
commit
4ba35c33ee
@ -52,12 +52,14 @@ export const FilterRows = ({
|
|||||||
onRemove?.();
|
onRemove?.();
|
||||||
};
|
};
|
||||||
|
|
||||||
const columnOptions: SelectItem[] = columns.map(column => {
|
const columnOptions: SelectItem[] = columns
|
||||||
return {
|
.sort((a, b) => (a.name > b.name ? 1 : -1))
|
||||||
label: column.name,
|
.map(column => {
|
||||||
value: column.name,
|
return {
|
||||||
};
|
label: column.name,
|
||||||
});
|
value: column.name,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
const operatorOptions: SelectItem[] = operators.map(operator => ({
|
const operatorOptions: SelectItem[] = operators.map(operator => ({
|
||||||
label: `[${operator.value}] ${operator.name}`,
|
label: `[${operator.value}] ${operator.name}`,
|
||||||
|
@ -32,12 +32,14 @@ export const SortRows = ({
|
|||||||
}
|
}
|
||||||
}, [initialSorts?.length]);
|
}, [initialSorts?.length]);
|
||||||
|
|
||||||
const columnOptions: SelectItem[] = columns.map(column => {
|
const columnOptions: SelectItem[] = columns
|
||||||
return {
|
.sort((a, b) => (a.name > b.name ? 1 : -1))
|
||||||
label: column.name,
|
.map(column => {
|
||||||
value: column.name,
|
return {
|
||||||
};
|
label: column.name,
|
||||||
});
|
value: column.name,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
const orderByOptions = [
|
const orderByOptions = [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user