fix: Display users alphabetically in board memberships popup (#1334)
This commit is contained in:
+8
-4
@@ -3,6 +3,7 @@
|
|||||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import orderBy from 'lodash/orderBy';
|
||||||
import React, { useEffect, useMemo } from 'react';
|
import React, { useEffect, useMemo } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@@ -31,10 +32,13 @@ const PureBoardMembershipsStep = React.memo(
|
|||||||
|
|
||||||
const filteredItems = useMemo(
|
const filteredItems = useMemo(
|
||||||
() =>
|
() =>
|
||||||
items.filter(
|
orderBy(
|
||||||
({ user }) =>
|
items.filter(
|
||||||
user.name.toLowerCase().includes(cleanSearch) ||
|
({ user }) =>
|
||||||
(user.username && user.username.includes(cleanSearch)),
|
user.name.toLowerCase().includes(cleanSearch) ||
|
||||||
|
(user.username && user.username.includes(cleanSearch)),
|
||||||
|
),
|
||||||
|
({ user }) => user.name.toLowerCase(),
|
||||||
),
|
),
|
||||||
[items, cleanSearch],
|
[items, cleanSearch],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user