tabulator-tables 5.1.7 → 5.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabulator-tables",
3
- "version": "5.1.7",
3
+ "version": "5.1.8",
4
4
  "description": "Interactive table generation JavaScript library",
5
5
  "style": "dist/css/tabulator.css",
6
6
  "main": "dist/js/tabulator.js",
@@ -12,14 +12,14 @@ export default class ComponentFunctionBinder{
12
12
  }
13
13
 
14
14
  if(this.bindings[type][funcName]){
15
- console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, hanlder)
15
+ console.warn("Unable to bind component handler, a matching function name is already bound", type, funcName, handler)
16
16
  }else{
17
17
  this.bindings[type][funcName] = handler;
18
18
  }
19
19
  }
20
20
 
21
21
  handle(type, component, name){
22
- if(this.bindings[type] && this.bindings[type][name]){
22
+ if(this.bindings[type] && this.bindings[type][name] && typeof this.bindings[type][name].bind === 'function'){
23
23
  return this.bindings[type][name].bind(null, component);
24
24
  }else{
25
25
  if(name !== "then" && typeof name === "string" && !name.startsWith("_")){
@@ -27,4 +27,4 @@ export default class ComponentFunctionBinder{
27
27
  }
28
28
  }
29
29
  }
30
- }
30
+ }
@@ -638,6 +638,7 @@ class Edit extends Module{
638
638
  cell.column.definition.cellEditing.call(this.table, component);
639
639
  }
640
640
 
641
+ this.dispatch("cell-editing", cell);
641
642
  this.dispatchExternal("cellEditing", component);
642
643
 
643
644
  params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params;
@@ -480,6 +480,7 @@ export default function(cell, onRendered, success, cancel, editorParams){
480
480
  if(!input.value){
481
481
  unsetItems();
482
482
  chooseItems();
483
+ showList();
483
484
  }
484
485
  });
485
486
 
@@ -9,14 +9,12 @@ export default function(cell, formatterParams, onRendered){
9
9
  var newDatetime = inputFormat === "iso" ? DT.fromISO(String(value)) : DT.fromFormat(String(value), inputFormat);
10
10
 
11
11
  if(newDatetime.isValid){
12
-
13
12
  if(formatterParams.timezone){
14
- newDatetime = newDatetime.shiftTimezone(formatterParams.timezone);
13
+ newDatetime = newDatetime.setZone(formatterParams.timezone);
15
14
  }
16
15
 
17
16
  return newDatetime.toFormat(outputFormat);
18
17
  }else{
19
-
20
18
  if(invalid === true || !value){
21
19
  return value;
22
20
  }else if(typeof invalid === "function"){
@@ -313,6 +313,7 @@ class Menu extends Module{
313
313
 
314
314
  setTimeout(() => {
315
315
  this.table.rowManager.element.addEventListener("scroll", this.blurEvent);
316
+ this.subscribe("cell-editing", this.blurEvent);
316
317
  document.body.addEventListener("click", this.blurEvent);
317
318
  document.body.addEventListener("contextmenu", this.blurEvent);
318
319
  window.addEventListener("resize", this.blurEvent);
@@ -366,6 +367,7 @@ class Menu extends Module{
366
367
  document.body.removeEventListener("contextmenu", this.blurEvent);
367
368
  window.removeEventListener("resize", this.blurEvent);
368
369
  this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
370
+ this.unsubscribe("cell-editing", this.blurEvent);
369
371
 
370
372
  if(this.currentComponent){
371
373
  this.dispatchExternal("menuClosed", this.currentComponent.getComponent());
@@ -376,4 +378,4 @@ class Menu extends Module{
376
378
 
377
379
  Menu.moduleName = "menu";
378
380
 
379
- export default Menu;
381
+ export default Menu;