@vnejs/plugins.views.settings 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,9 @@ export class SettingsFieldsControllerArrows extends ModuleControllerArrowsVertic
13
13
  this.on(this.EVENTS.SETTINGS_VIEW.TAB_SET, this.onTabSet);
14
14
  };
15
15
  onShow = (payload = {}) => {
16
+ if (this.isShow)
17
+ return;
18
+ this.isShow = true;
16
19
  this.syncFields(payload);
17
20
  this.currentItem = null;
18
21
  return this.emit(this.EVENTS.CONTROLS.PUSH, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.views.settings",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,6 +29,9 @@ export class SettingsFieldsControllerArrows extends ModuleControllerArrowsVertic
29
29
  };
30
30
 
31
31
  onShow = (payload: SettingsViewTabPayload = {}) => {
32
+ if (this.isShow) return;
33
+
34
+ this.isShow = true;
32
35
  this.syncFields(payload);
33
36
  this.currentItem = null;
34
37
 
@@ -40,6 +40,7 @@ describe("SettingsFieldsControllerArrows", () => {
40
40
  const { observer } = createSettingsViewTestModule(SettingsFieldsControllerArrows);
41
41
  const pop = spyEvent(observer, CONTROLS_EVENTS.POP);
42
42
 
43
+ await observer.emit(SUBSCRIBE_EVENTS.SHOW, { tab: generalTab });
43
44
  await observer.emit(SUBSCRIBE_EVENTS.HIDE);
44
45
 
45
46
  expect(pop).toHaveBeenCalledExactlyOnceWith({ key: "settings.fields.controller.arrows" });