fix search method in admin permission page

This commit is contained in:
ngfrolov 2022-06-15 14:31:12 +05:00
parent 7f1160587c
commit fb0cc1637b

View File

@ -28,7 +28,9 @@ const PermissionController = memo(() => {
const filteredPermissions = useMemo(() => permissions.filter((permission) => permission && (!searchValue || [ const filteredPermissions = useMemo(() => permissions.filter((permission) => permission && (!searchValue || [
permission.name ?? '', permission.name ?? '',
permission.description ?? '', permission.description ?? '',
].join(' ').includes(searchValue.toLowerCase())) ].join(' ')
.toLowerCase()
.includes(searchValue.toLowerCase()))
), [permissions, searchValue]) ), [permissions, searchValue])
const updateTable = useCallback(async () => invokeWebApiWrapperAsync( const updateTable = useCallback(async () => invokeWebApiWrapperAsync(