Skip to content

feat: Display filter list in data browser sorted alphabetically #2761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/CategoryList/CategoryList.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import styles from 'components/CategoryList/CategoryList.scss';
import { CurrentApp } from 'context/currentApp';
import generatePath from 'lib/generatePath';
import PropTypes from 'lib/PropTypes';
import React from 'react';
import styles from 'components/CategoryList/CategoryList.scss';
import { Link } from 'react-router-dom';
import generatePath from 'lib/generatePath';
import { CurrentApp } from 'context/currentApp';

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