Skip to content

Commit

Permalink
Resolved type error within EuiContextMenu by removing the watchedItem…
Browse files Browse the repository at this point in the history
…Props prop. It was recently deprecated in EUI PR# 5880 (elastic/eui#5880) as is no longer needed
  • Loading branch information
breehall committed May 18, 2022
1 parent bd52b5b commit f8a3e2e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,7 @@ export class SavedObjectFinderUi extends React.Component<
</EuiFilterButton>
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.getSortOptions()}
/>
<EuiContextMenuPanel items={this.getSortOptions()} />
</EuiPopover>
{this.props.showFilter && (
<EuiPopover
Expand Down Expand Up @@ -430,7 +427,6 @@ export class SavedObjectFinderUi extends React.Component<
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.props.savedObjectMetaData.map((metaData) => (
<EuiContextMenuItem
key={metaData.type}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
}
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
data-test-subj="lnsIndexPatternTypeFilterOptions"
items={(availableFieldTypes as DataType[]).map((type) => (
<EuiContextMenuItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,7 @@ export const LinksMenuUI = (props: LinksMenuProps) => {
]);

return (
<EuiContextMenuPanel
items={contextMenuItems}
watchedItemProps={['disabled', 'href']} // Ensures the 'View in Discover' link rerenders when loading completes
data-test-subj="mlAnomaliesListRowActionsMenu"
/>
<EuiContextMenuPanel items={contextMenuItems} data-test-subj="mlAnomaliesListRowActionsMenu" />
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export class SpacesPopoverList extends Component<Props, State> {
title: i18n.translate('xpack.security.management.editRole.spacesPopoverList.popoverTitle', {
defaultMessage: 'Spaces',
}),
watchedItemProps: ['data-search-term'],
};

if (this.props.spaces.length >= SPACE_SEARCH_COUNT_THRESHOLD) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class SpacesMenuUI extends Component<Props, State> {
id: 'xpack.spaces.navControl.spacesMenu.changeCurrentSpaceTitle',
defaultMessage: 'Change current space',
}),
watchedItemProps: ['data-search-term'],
};

if (this.props.spaces.length >= SPACE_SEARCH_COUNT_THRESHOLD) {
Expand Down

0 comments on commit f8a3e2e

Please sign in to comment.