Skip to content

Commit bbf3606

Browse files
authored
Merge branch 'master' into opensearch/update-to-2.19.4
2 parents ebe550a + 4944fef commit bbf3606

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

graylog2-web-interface/src/components/content-packs/ContentPackSelectionList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ const ContentPackSelectionList = ({
7373
updateSelectionGroup: (group: unknown) => void;
7474
updateSelectionEntity: (entity: unknown) => void;
7575
}) => {
76-
const [expandedSections, setExpandedSections] = useState<Array<string>>(
77-
isFiltered ? Object.keys(entities) : [],
78-
);
76+
const [expandedSections, setExpandedSections] = useState<Array<string>>(isFiltered ? Object.keys(entities) : []);
7977

8078
useEffect(() => {
8179
setExpandedSections(isFiltered ? Object.keys(entities) : []);

graylog2-web-interface/src/components/lookup-tables/lookup-table-view/test-lookup.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* <http://www.mongodb.com/licensing/server-side-public-license>.
1616
*/
1717
import * as React from 'react';
18-
import { useState } from 'react';
18+
import { useState, useMemo } from 'react';
1919
import styled from 'styled-components';
2020

2121
import useProductName from 'brand-customization/useProductName';
@@ -65,7 +65,7 @@ function TestLookup({ table }: Props) {
6565
lookupPreview: { results, total, supported },
6666
} = useFetchLookupPreview(table.id, !lutError, previewSize);
6767

68-
const dataPreview = React.useMemo(() => {
68+
const dataPreview = useMemo(() => {
6969
if (total === 0) return 'No results to show';
7070

7171
return JSON.stringify(results, null, 2);
@@ -111,10 +111,7 @@ function TestLookup({ table }: Props) {
111111
}
112112
};
113113

114-
const showResults = React.useMemo(
115-
() => !lutError && (lookupResult || supported),
116-
[lutError, lookupResult, supported],
117-
);
114+
const showResults = useMemo(() => !lutError && (lookupResult || supported), [lutError, lookupResult, supported]);
118115

119116
return (
120117
<Col $gap="sm">

0 commit comments

Comments
 (0)