Skip to content

Commit 0209a0d

Browse files
authored
feat: Display filter list in data browser sorted alphabetically (#2761)
1 parent 1d1f5a7 commit 0209a0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/CategoryList/CategoryList.react.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* This source code is licensed under the license found in the LICENSE file in
66
* the root directory of this source tree.
77
*/
8+
import styles from 'components/CategoryList/CategoryList.scss';
9+
import { CurrentApp } from 'context/currentApp';
10+
import generatePath from 'lib/generatePath';
811
import PropTypes from 'lib/PropTypes';
912
import React from 'react';
10-
import styles from 'components/CategoryList/CategoryList.scss';
1113
import { Link } from 'react-router-dom';
12-
import generatePath from 'lib/generatePath';
13-
import { CurrentApp } from 'context/currentApp';
1414

1515
export default class CategoryList extends React.Component {
1616
static contextType = CurrentApp;
@@ -137,7 +137,7 @@ export default class CategoryList extends React.Component {
137137
)}
138138
</div>
139139
{this.state.openClasses.includes(id) &&
140-
c.filters.map((filterData, index) => {
140+
c.filters.sort((a, b) => a.name.localeCompare(b.name)).map((filterData, index) => {
141141
const { name, filter } = filterData;
142142
const url = `${this.props.linkPrefix}${c.name}?filters=${encodeURIComponent(
143143
filter

0 commit comments

Comments
 (0)