Restore dashboards: Disable clicks for deleted dashboards (#111083)

This commit is contained in:
Alex Khomenko
2025-09-15 17:48:22 +03:00
committed by GitHub
parent 1c297e48b8
commit c96427c193
3 changed files with 3 additions and 3 deletions
@@ -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}>