Skip to content

Commit

Permalink
PR amendments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed May 31, 2024
1 parent d6c1028 commit a3e04b2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,12 @@ const FieldCellValue = ({
className={FIELD_NAME_CLASS}
data-test-subj="unifiedDataTableComparisonFieldName"
>
{field?.displayName ?? fieldName}{' '}
{field?.displayName ?? fieldName}
{isDerivedAsPartOfSmartField ? (
<SmartFieldFallbackTooltip associatedSmartFields={associatedSmartFields} />
<>
{' '}
<SmartFieldFallbackTooltip associatedSmartFields={associatedSmartFields} />
</>
) : null}
</EuiText>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export type UnifiedFieldListSidebarCustomizableProps = Pick<
/**
* Prop to pass additional field groups to the field list
*/
additionalFieldGroups?: AdditionalFieldGroups;
additionalFieldGroups?: AdditionalFieldGroups<DataViewField>;
};

interface UnifiedFieldListSidebarInternalProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
type OverrideFieldGroupDetails,
FieldsGroupNames,
ExistenceFetchStatus,
AdditionalFieldGroups,
} from '../types';
import { useExistingFieldsReader } from './use_existing_fields';
import {
Expand All @@ -43,9 +44,7 @@ export interface GroupedFieldsParams<T extends FieldListItem> {
onSupportedFieldFilter?: (field: T) => boolean;
onSelectedFieldFilter?: (field: T) => boolean;
getNewFieldsBySpec?: UseNewFieldsParams<T>['getNewFieldsBySpec'];
additionalFieldGroups?: {
smartFields?: FieldsGroup<T>['fields'];
};
additionalFieldGroups?: AdditionalFieldGroups<T>;
}

export interface GroupedFieldsResult<T extends FieldListItem> {
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-unified-field-list/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ export type FieldListGroups<T extends FieldListItem> = {
[key in FieldsGroupNames]?: FieldsGroup<T>;
};

export interface AdditionalFieldGroups {
smartFields?: FieldsGroup<DataViewField>['fields'];
export interface AdditionalFieldGroups<T extends FieldListItem = FieldListItem> {
smartFields?: FieldsGroup<T>['fields'];
fallbackFields?: Record<string, string[]>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ export const FieldStatisticsTable = (props: FieldStatisticsTableProps) => {

return (
<>
{displayName}{' '}
{displayName}
{isDerivedAsPartOfSmartField ? (
<SmartFieldFallbackTooltip associatedSmartFields={associatedSmartFields} />
<>
{' '}
<SmartFieldFallbackTooltip associatedSmartFields={associatedSmartFields} />
</>
) : null}
</>
);
Expand Down

0 comments on commit a3e04b2

Please sign in to comment.