@dile/crud 1.12.9 → 1.13.0
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.
|
@@ -79,6 +79,13 @@ export class DileCrudSingleActions extends DileCrudActions {
|
|
|
79
79
|
onActionSelected(e) {
|
|
80
80
|
this.selection = e.detail.selected;
|
|
81
81
|
this.computeDestructive();
|
|
82
|
-
|
|
82
|
+
|
|
83
|
+
const selectedAction = this.actions.find(action => action.name === this.selection);
|
|
84
|
+
|
|
85
|
+
if (selectedAction && selectedAction.onClick) {
|
|
86
|
+
selectedAction.onClick(this.element);
|
|
87
|
+
} else {
|
|
88
|
+
this.showAction();
|
|
89
|
+
}
|
|
83
90
|
}
|
|
84
91
|
}
|
|
@@ -139,7 +139,7 @@ export class DileCrudSingle extends DileI18nMixin(DileCrudMixin(LitElement)) {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
actionSuccess(e) {
|
|
142
|
-
if(e.detail.action
|
|
142
|
+
if(!this.config.destructiveActionNames.includes(e.detail.action)) {
|
|
143
143
|
this.refresh();
|
|
144
144
|
}
|
|
145
145
|
if(this.config.onActionSingleSuccess) {
|
package/lib/defaultConfig.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/crud",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Components to create a generic crud system based on Web Components and Lit",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "674a5860bcaba46e1bd5368635e471fd4f5f626f"
|
|
35
35
|
}
|