mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Second click on list item closes the details view (#3809)
Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
This commit is contained in:
1 parent
64fb590377
commit
74f3826235
6 files changed
+37
-7
No files matched your search
@@ -55,6 +55,14 @@ export class HelmCharts extends Component<Props> {
|
||||
return helmChartStore.getByName(chartName, repo);
|
||||
}
|
||||
|
||||
onDetails = (chart: HelmChart) => {
|
||||
if (chart === this.selectedChart) {
|
||||
this.hideDetails();
|
||||
} else {
|
||||
this.showDetails(chart);
|
||||
}
|
||||
};
|
||||
|
||||
showDetails = (chart: HelmChart) => {
|
||||
if (!chart) {
|
||||
navigation.push(helmChartsURL());
|
||||
@@ -121,7 +129,7 @@ export class HelmCharts extends Component<Props> {
|
||||
{ className: "menu" }
|
||||
]}
|
||||
detailsItem={this.selectedChart}
|
||||
onDetails={this.showDetails}
|
||||
onDetails={this.onDetails}
|
||||
/>
|
||||
{this.selectedChart && (
|
||||
<HelmChartDetails
|
||||
|
||||
Reference in new issue
Block a user