mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #11235 from jibees/11223-notices-tab-on-shopfront-persisting-after-selecting-an-order-cycle
Shopfront: On non-shop tab, when changing OC, switch to shop tab and hides non-shop tab content
This commit is contained in:
@@ -40,8 +40,8 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
simulateClick(tab, panel) {
|
||||
this.updateActiveTab(tab);
|
||||
this.updateActivePanel(panel);
|
||||
this.updateActiveTab(tab);
|
||||
}
|
||||
|
||||
changeActivePanel(event) {
|
||||
@@ -49,9 +49,7 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
updateActivePanel(panel_id) {
|
||||
const newActivePanel = this.panelTargets.find(
|
||||
(panel) => panel.id == panel_id
|
||||
);
|
||||
const newActivePanel = this.panelTargets.find((panel) => panel.id == panel_id);
|
||||
|
||||
if (newActivePanel === undefined) {
|
||||
// No panel found
|
||||
@@ -84,8 +82,6 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
get currentActivePanel() {
|
||||
return this.panelTargets.find(
|
||||
(panel) => panel.id == `${this.currentActiveTab.id}_panel`
|
||||
);
|
||||
return this.panelTargets.find((panel) => panel.id == `${this.currentActiveTab.id}_panel`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user