@dile/crud 1.12.8 → 1.12.10

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,7 +80,7 @@ export class DileCrudSingle extends DileI18nMixin(DileCrudMixin(LitElement)) {
80
80
  return html`
81
81
  <main class="elcontainer">
82
82
  ${this.detailTemplate}
83
- ${this.config?.customization?.disableEdit === false && (!this.config?.actions?.list || this.config.actions.list.length === 0) ? '' : html`
83
+ ${this.config?.customization?.disableEdit && (!this.config?.actions?.list || this.config.actions.list.length === 0) ? '' : html`
84
84
  <div class="actions" @action-success=${this.actionSuccess}>
85
85
  ${!this.config?.customization?.disableEdit ? html`
86
86
  <dile-button .icon="${editIcon}" @click=${this.edit}>
@@ -139,7 +139,7 @@ export class DileCrudSingle extends DileI18nMixin(DileCrudMixin(LitElement)) {
139
139
  }
140
140
 
141
141
  actionSuccess(e) {
142
- if(e.detail.action != "DeleteAction") {
142
+ if(!this.config.destructiveActionNames.includes(e.detail.action)) {
143
143
  this.refresh();
144
144
  }
145
145
  if(this.config.onActionSingleSuccess) {
@@ -81,4 +81,5 @@ export const defaultConfig = {
81
81
  },
82
82
  onActionListSuccess(actionSuccessDetail) {},
83
83
  onActionSingleSuccess(actionSuccessDetail) {},
84
+ destructiveActionNames: ['DeleteAction'],
84
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "1.12.8",
3
+ "version": "1.12.10",
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": "0d2eb2492ae3eb56575294b520ac2a0612b6b23f"
34
+ "gitHead": "2faa360ef3b15439895fd540254eda182e965e33"
35
35
  }