@syncfusion/ej2-inplace-editor 20.4.48 → 20.4.54
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/CHANGELOG.md +10 -0
- package/dist/ej2-inplace-editor.min.js +2 -2
- package/dist/ej2-inplace-editor.umd.min.js +2 -2
- package/dist/ej2-inplace-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-inplace-editor.es2015.js +56 -52
- package/dist/es6/ej2-inplace-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-inplace-editor.es5.js +57 -53
- package/dist/es6/ej2-inplace-editor.es5.js.map +1 -1
- package/dist/global/ej2-inplace-editor.min.js +2 -2
- package/dist/global/ej2-inplace-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +15 -15
- package/src/inplace-editor/base/inplace-editor.js +57 -53
|
@@ -881,7 +881,7 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
881
881
|
this.submitBtn = undefined;
|
|
882
882
|
}
|
|
883
883
|
if (!isNullOrUndefined(this.cancelBtn)) {
|
|
884
|
-
EventHandler.remove(this.cancelBtn.element, '
|
|
884
|
+
EventHandler.remove(this.cancelBtn.element, 'mouseup', this.cancelBtnClick);
|
|
885
885
|
EventHandler.remove(this.cancelBtn.element, 'keydown', this.btnKeyDownHandler);
|
|
886
886
|
this.cancelBtn.destroy();
|
|
887
887
|
this.cancelBtn = undefined;
|
|
@@ -1172,7 +1172,7 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1172
1172
|
EventHandler.add(this.submitBtn.element, 'keydown', this.btnKeyDownHandler, this);
|
|
1173
1173
|
}
|
|
1174
1174
|
if (!isNullOrUndefined(this.cancelBtn)) {
|
|
1175
|
-
EventHandler.add(this.cancelBtn.element, '
|
|
1175
|
+
EventHandler.add(this.cancelBtn.element, 'mouseup', this.cancelBtnClick, this);
|
|
1176
1176
|
EventHandler.add(this.cancelBtn.element, 'keydown', this.btnKeyDownHandler, this);
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
@@ -1478,57 +1478,61 @@ let InPlaceEditor = class InPlaceEditor extends Component {
|
|
|
1478
1478
|
* @private
|
|
1479
1479
|
*/
|
|
1480
1480
|
onPropertyChanged(newProp, oldProp) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1481
|
+
let checkValidation = this.validationRules ? !isNullOrUndefined(this.element.querySelectorAll('.' + ERROR)) &&
|
|
1482
|
+
this.element.querySelectorAll('.' + ERROR).length > 0 ? false : true : true;
|
|
1483
|
+
if (checkValidation) {
|
|
1484
|
+
if (this.isEditorOpen()) {
|
|
1485
|
+
const editModeChanged = 'enableEditMode' in newProp;
|
|
1486
|
+
if ((editModeChanged && oldProp.enableEditMode && !newProp.enableEditMode) || (!editModeChanged && this.enableEditMode)) {
|
|
1487
|
+
this.triggerEndEdit('cancel');
|
|
1488
|
+
}
|
|
1489
|
+
else {
|
|
1490
|
+
this.removeEditor();
|
|
1491
|
+
}
|
|
1488
1492
|
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1493
|
+
for (const prop of Object.keys(newProp)) {
|
|
1494
|
+
switch (prop) {
|
|
1495
|
+
case 'showButtons':
|
|
1496
|
+
// eslint-disable-next-line
|
|
1497
|
+
(newProp.showButtons) ? this.appendButtons(this.formEle) : this.destroyButtons();
|
|
1498
|
+
break;
|
|
1499
|
+
case 'value':
|
|
1500
|
+
this.updateValue();
|
|
1501
|
+
// eslint-disable-next-line
|
|
1502
|
+
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1503
|
+
: this.renderInitialValue();
|
|
1504
|
+
break;
|
|
1505
|
+
case 'emptyText':
|
|
1506
|
+
// eslint-disable-next-line
|
|
1507
|
+
this.textOption === 'Never' ? this.renderValue(this.checkValue(parseValue(this.type, this.value, this.model)))
|
|
1508
|
+
: this.renderInitialValue();
|
|
1509
|
+
break;
|
|
1510
|
+
case 'template':
|
|
1511
|
+
this.checkIsTemplate();
|
|
1512
|
+
break;
|
|
1513
|
+
case 'disabled':
|
|
1514
|
+
this.disable(newProp.disabled);
|
|
1515
|
+
break;
|
|
1516
|
+
case 'enableRtl':
|
|
1517
|
+
this.setRtl(newProp.enableRtl);
|
|
1518
|
+
break;
|
|
1519
|
+
case 'cssClass':
|
|
1520
|
+
this.setClass('remove', oldProp.cssClass);
|
|
1521
|
+
this.setClass('add', newProp.cssClass);
|
|
1522
|
+
break;
|
|
1523
|
+
case 'mode':
|
|
1524
|
+
this.enableEditor(this.enableEditMode);
|
|
1525
|
+
break;
|
|
1526
|
+
case 'enableEditMode':
|
|
1527
|
+
this.enableEditor(newProp.enableEditMode);
|
|
1528
|
+
break;
|
|
1529
|
+
case 'editableOn':
|
|
1530
|
+
this.unWireEditEvent(oldProp.editableOn);
|
|
1531
|
+
if (newProp.editableOn !== 'EditIconClick') {
|
|
1532
|
+
this.wireEditEvent(newProp.editableOn);
|
|
1533
|
+
}
|
|
1534
|
+
break;
|
|
1535
|
+
}
|
|
1532
1536
|
}
|
|
1533
1537
|
}
|
|
1534
1538
|
}
|