[Lens] fix wrong message in fields accordion (#78924)

This commit is contained in:
Marta Bondyra 2020-09-30 18:51:18 +02:00 committed by GitHub
parent f43c89f339
commit 3e7fb9352d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -557,6 +557,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
}}
currentIndexPatternId={currentIndexPatternId}
existenceFetchFailed={existenceFetchFailed}
existFieldsInIndex={!!allFields.length}
/>
</EuiFlexItem>
</EuiFlexGroup>

View file

@ -52,6 +52,7 @@ export function FieldList({
hasSyncedExistingFields,
filter,
currentIndexPatternId,
existFieldsInIndex,
}: {
exists: (field: IndexPatternField) => boolean;
fieldGroups: FieldGroups;
@ -63,6 +64,7 @@ export function FieldList({
typeFilter: string[];
};
currentIndexPatternId: string;
existFieldsInIndex: boolean;
}) {
const [pageSize, setPageSize] = useState(PAGINATION_SIZE);
const [scrollContainer, setScrollContainer] = useState<Element | undefined>(undefined);
@ -180,7 +182,7 @@ export function FieldList({
isAffectedByGlobalFilter={fieldGroup.isAffectedByGlobalFilter}
isAffectedByFieldFilter={isAffectedByFieldFilter}
isAffectedByTimerange={fieldGroup.isAffectedByTimeFilter}
existFieldsInIndex={!!fieldGroup.fieldCount}
existFieldsInIndex={!!existFieldsInIndex}
/>
}
/>