Fixed #2255 Search in user-list is case sensitive. (#2261)

* Fixed #2255 Search in user-list is case sensitive.

* Addressing review comment
This commit is contained in:
Sachin Chaurasiya 2022-01-18 21:15:28 +05:30 committed by GitHub
parent a9c840778a
commit 7a33a3a23b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
*/ */
import { compare, Operation } from 'fast-json-patch'; import { compare, Operation } from 'fast-json-patch';
import { isUndefined, lowerCase } from 'lodash'; import { isUndefined, toLower } from 'lodash';
import React, { FunctionComponent, useEffect, useState } from 'react'; import React, { FunctionComponent, useEffect, useState } from 'react';
import PageLayout from '../../components/containers/PageLayout'; import PageLayout from '../../components/containers/PageLayout';
import Loader from '../../components/Loader/Loader'; import Loader from '../../components/Loader/Loader';
@ -51,7 +51,7 @@ const UserList: FunctionComponent<Props> = ({
}; };
const isIncludes = (name: string) => { const isIncludes = (name: string) => {
return lowerCase(name).includes(searchText); return toLower(name).includes(toLower(searchText));
}; };
const setCurrentTabList = (tab: number) => { const setCurrentTabList = (tab: number) => {

View File

@ -12,7 +12,7 @@
*/ */
import classNames from 'classnames'; import classNames from 'classnames';
import { isNil, isUndefined, lowerCase } from 'lodash'; import { isNil, isUndefined, toLower } from 'lodash';
import React, { FunctionComponent, useEffect, useRef, useState } from 'react'; import React, { FunctionComponent, useEffect, useRef, useState } from 'react';
import { useWindowDimensions } from '../../hooks/useWindowDimensions'; import { useWindowDimensions } from '../../hooks/useWindowDimensions';
import { getCountBadge } from '../../utils/CommonUtils'; import { getCountBadge } from '../../utils/CommonUtils';
@ -92,7 +92,7 @@ const DropDownList: FunctionComponent<DropDownListProp> = ({
useEffect(() => { useEffect(() => {
setSearchedList( setSearchedList(
dropDownList.filter((item) => { dropDownList.filter((item) => {
return lowerCase(item.name as string).includes(lowerCase(searchText)); return toLower(item.name as string).includes(toLower(searchText));
}) })
); );
}, [searchText, dropDownList]); }, [searchText, dropDownList]);