mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Bug/collection type sort asc (#8706)
* fixed leftmenu sorting bug in content-types-builder Signed-off-by: akhilmhdh <akhilmhdh@gmail.com> * changed js toLowerCase to lodash toLower Signed-off-by: akhilmhdh <akhilmhdh@gmail.com> Co-authored-by: cyril lopez <cyril.lpz@gmail.com>
This commit is contained in:
parent
bbff091b88
commit
96db1488bc
@ -1,6 +1,6 @@
|
||||
import React, { isValidElement, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { get, isEmpty, isObject } from 'lodash';
|
||||
import { get, isEmpty, isObject, toLower } from 'lodash';
|
||||
import { useGlobalContext } from '../../contexts/GlobalContext';
|
||||
import matchSorter from 'match-sorter';
|
||||
import LeftMenuLink from '../LeftMenuLink';
|
||||
@ -54,12 +54,13 @@ function LeftMenuList({ customLink, links, title, searchable }) {
|
||||
return links.map(link => {
|
||||
return {
|
||||
...link,
|
||||
links: matchSorter(link.links, search, { keys: ['title'] }),
|
||||
links: matchSorter(link.links, toLower(search), {
|
||||
keys: [item => toLower(item.title)],
|
||||
}),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
return matchSorter(links, search, { keys: ['title'] });
|
||||
return matchSorter(links, toLower(search), { keys: [item => toLower(item.title)] });
|
||||
};
|
||||
|
||||
const renderCompo = (link, i) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user