Skip to content

Commit a23f769

Browse files
Merge pull request #206 from devtron-labs/fix/plugin-learn-more
fix: add stopPropagation for learn more link in plugin list
2 parents 3b956ba + 6f105ed commit a23f769

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Shared/Components/Plugin/PluginCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Checkbox, CHECKBOX_VALUE } from '../../../Common'
1+
import { Checkbox, CHECKBOX_VALUE, stopPropagation } from '../../../Common'
22
import PluginImageContainer from './PluginImageContainer'
33
import PluginTagsContainer from './PluginTagsContainer'
44
import { PluginCardProps } from './types'
@@ -74,6 +74,7 @@ const PluginCard = ({
7474
className="anchor fs-12 fw-6 lh-20"
7575
target="_blank"
7676
rel="noopener noreferrer"
77+
onClick={stopPropagation}
7778
>
7879
Learn more
7980
</a>

src/Shared/Components/Plugin/PluginListContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ const PluginListContainer = ({
7979

8080
const [isLoadingPluginData, pluginData, pluginDataError, reloadPluginData] = useAsync(
8181
getPluginStoreDataWrapper,
82-
persistFilters ? [pluginList] : [searchKey, appId, selectedTags],
82+
// In case of persistFilters with change of searchKey or selectedTags we anyways clear the pluginList so no need to add dependency
83+
[searchKey, appId, selectedTags],
8384
persistFilters ? !pluginList.length : true,
8485
)
8586

0 commit comments

Comments
 (0)