Skip to content

Commit

Permalink
improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Sep 23, 2020
1 parent 3013d99 commit 7ee7bbb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
const fieldInfoUnavailable = existenceFetchFailed || currentIndexPattern.hasRestrictions;

const unfilteredFieldGroups: FieldGroups = useMemo(() => {
const fieldByName = keyBy(allFields, 'name');
const containsData = (field: IndexPatternField) => {
const fieldByName = keyBy(allFields, 'name');
const overallField = fieldByName[field.name];

return (
Expand Down Expand Up @@ -364,7 +364,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({

// do not show empty field accordion if there is no existence information
if (fieldInfoUnavailable) {
delete fieldGroupDefinitions.emptyFields;
delete fieldGroupDefinitions.EmptyFields;
}

return fieldGroupDefinitions;
Expand Down

0 comments on commit 7ee7bbb

Please sign in to comment.