ezfw-core 1.0.15 → 1.0.16

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.
@@ -80,22 +80,27 @@ export class EzInput extends EzBaseComponent {
80
80
  }
81
81
  });
82
82
 
83
+ const getController = () => {
84
+ const ctrlName = this.config.controller;
85
+ return ctrlName ? ez.getControllerSync(ctrlName) : null;
86
+ };
87
+
83
88
  if (cfg.onKeydown) {
84
89
  input.addEventListener('keydown', e => {
85
- cfg.onKeydown!(e, this.controller);
90
+ cfg.onKeydown!(e, getController());
86
91
  });
87
92
  }
88
93
 
89
94
  if (cfg.onKeyup) {
90
95
  input.addEventListener('keyup', e => {
91
- cfg.onKeyup!(e, this.controller);
96
+ cfg.onKeyup!(e, getController());
92
97
  });
93
98
  }
94
99
 
95
100
  if (cfg.onEnter) {
96
101
  input.addEventListener('keydown', e => {
97
102
  if (e.key === 'Enter') {
98
- cfg.onEnter!(input.value, this.controller);
103
+ cfg.onEnter!(input.value, getController());
99
104
  }
100
105
  });
101
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezfw-core",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Ez Framework - A declarative component framework for building modern web applications",
5
5
  "type": "module",
6
6
  "main": "./core/ez.ts",