[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} currentIndexPatternId={currentIndexPatternId}
existenceFetchFailed={existenceFetchFailed} existenceFetchFailed={existenceFetchFailed}
existFieldsInIndex={!!allFields.length}
/> />
</EuiFlexItem> </EuiFlexItem>
</EuiFlexGroup> </EuiFlexGroup>

View file

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