ezfw-core 1.0.12 → 1.0.13

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.
@@ -132,11 +132,16 @@ export class EzDialog extends EzBaseComponent {
132
132
  dialog.appendChild(body);
133
133
 
134
134
  // Footer with buttons
135
- if (buttons && buttons.length > 0) {
135
+ let buttonList = buttons;
136
+ if (typeof buttons === 'function') {
137
+ buttonList = buttons(_dialogInstance);
138
+ }
139
+
140
+ if (Array.isArray(buttonList) && buttonList.length > 0) {
136
141
  const footer = document.createElement('div');
137
142
  footer.className = css('footer');
138
143
 
139
- for (const btn of buttons) {
144
+ for (const btn of buttonList) {
140
145
  const buttonConfig = {
141
146
  eztype: 'EzButton',
142
147
  text: btn.text,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezfw-core",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Ez Framework - A declarative component framework for building modern web applications",
5
5
  "type": "module",
6
6
  "main": "./core/ez.ts",
@@ -33,6 +33,9 @@ export class EzDialogService {
33
33
 
34
34
  setTimeout(() => {
35
35
  dialogInstance._el?.remove();
36
+ if (config.onDestroy) {
37
+ config.onDestroy();
38
+ }
36
39
  }, 200);
37
40
  }
38
41