@rxap/material-table-system 12.5.1 → 12.5.2
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/bundles/rxap-material-table-system.umd.js +21 -6
- package/bundles/rxap-material-table-system.umd.js.map +1 -1
- package/esm2015/lib/table-row-actions/table-row-action.directive.js +21 -6
- package/esm2015/lib/table-row-actions/table-row-action.directive.js.map +1 -1
- package/fesm2015/rxap-material-table-system.js +21 -6
- package/fesm2015/rxap-material-table-system.js.map +1 -1
- package/lib/table-row-actions/table-row-action.directive.d.ts +16 -0
- package/package.json +4 -4
|
@@ -2480,6 +2480,7 @@
|
|
|
2480
2480
|
this.matButton = matButton;
|
|
2481
2481
|
this._hasConfirmDirective = false;
|
|
2482
2482
|
this._currentStatus = exports.TableRowActionStatus.DONE;
|
|
2483
|
+
this._actionDisabled = false;
|
|
2483
2484
|
this.actionMethodList = utilities.coerceArray(actionMethodList);
|
|
2484
2485
|
}
|
|
2485
2486
|
Object.defineProperty(TableRowActionDirective.prototype, "hasConfirmDirective", {
|
|
@@ -2511,6 +2512,9 @@
|
|
|
2511
2512
|
return __generator(this, function (_c) {
|
|
2512
2513
|
switch (_c.label) {
|
|
2513
2514
|
case 0:
|
|
2515
|
+
if (this._actionDisabled) {
|
|
2516
|
+
return [2 /*return*/, Promise.resolve()];
|
|
2517
|
+
}
|
|
2514
2518
|
this.setStatus(exports.TableRowActionStatus.EXECUTING);
|
|
2515
2519
|
_c.label = 1;
|
|
2516
2520
|
case 1:
|
|
@@ -2554,15 +2558,26 @@
|
|
|
2554
2558
|
TableRowActionDirective.prototype.findTypedActionMethod = function () {
|
|
2555
2559
|
return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type));
|
|
2556
2560
|
};
|
|
2561
|
+
/**
|
|
2562
|
+
* Disables the action. If the button is pressed the action is NOT executed
|
|
2563
|
+
*
|
|
2564
|
+
* Hint: the button is set to disabled = true to prevent any conflict with
|
|
2565
|
+
* extern button enable features linke : rxapHasEnablePermission
|
|
2566
|
+
* @protected
|
|
2567
|
+
*/
|
|
2557
2568
|
TableRowActionDirective.prototype.setButtonDisabled = function () {
|
|
2558
|
-
|
|
2559
|
-
this.matButton.disabled = true;
|
|
2560
|
-
}
|
|
2569
|
+
this._actionDisabled = true;
|
|
2561
2570
|
};
|
|
2571
|
+
/**
|
|
2572
|
+
* Enables the action. If the button is pressed the action is executed
|
|
2573
|
+
*
|
|
2574
|
+
* TODO : find a way to communicate the disabled state between the features
|
|
2575
|
+
* Hint: the button is set to disabled = false to prevent any conflict with
|
|
2576
|
+
* extern button enable features linke : rxapHasEnablePermission
|
|
2577
|
+
* @protected
|
|
2578
|
+
*/
|
|
2562
2579
|
TableRowActionDirective.prototype.setButtonEnabled = function () {
|
|
2563
|
-
|
|
2564
|
-
this.matButton.disabled = false;
|
|
2565
|
-
}
|
|
2580
|
+
this._actionDisabled = false;
|
|
2566
2581
|
};
|
|
2567
2582
|
TableRowActionDirective.prototype.setStatus = function (status) {
|
|
2568
2583
|
var _a, _b;
|