Restore dashboards: Disable clicks for deleted dashboards (#111083)
This commit is contained in:
@@ -136,7 +136,7 @@ export function SearchView({
|
||||
onTagSelected: stateManager.onAddTag,
|
||||
keyboardEvents,
|
||||
onDatasourceChange: searchState.datasource ? stateManager.onDatasourceChange : undefined,
|
||||
onClickItem: stateManager.onSearchItemClicked,
|
||||
onClickItem: searchState.deleted ? undefined : stateManager.onSearchItemClicked,
|
||||
};
|
||||
|
||||
return <SearchResultsTable {...props} />;
|
||||
|
||||
@@ -148,7 +148,7 @@ export const SearchResultsTable = React.memo(
|
||||
cell={cell}
|
||||
columnIndex={index}
|
||||
columnCount={row.cells.length}
|
||||
userProps={{ href: url, onClick: onClickItem }}
|
||||
userProps={{ href: onClickItem ? url : undefined, onClick: onClickItem }}
|
||||
frame={response.view.dataFrame}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -128,7 +128,7 @@ export const generateColumns = (
|
||||
<div key={key} className={styles.cell} {...cellProps}>
|
||||
{!response.isItemLoaded(p.row.index) ? (
|
||||
<Skeleton width={200} />
|
||||
) : isDeleted ? (
|
||||
) : isDeleted || !p.userProps.href ? (
|
||||
<span className={classNames}>{name}</span>
|
||||
) : (
|
||||
<a href={p.userProps.href} onClick={p.userProps.onClick} className={classNames} title={name}>
|
||||
|
||||
Reference in New Issue
Block a user