Open blaggacao opened 2 months ago
hi @blaggacao The button works properly. It deletes the page. The problem is that the modal is expected to close after deleting successfully
It's been a while, but I don't remember ever see a page disappear (except if I delete it from the backend).
It appears this requires websocket via ws
and does not work (well/at all) with long polling.
@netchampfaris I noticed that I can locally reproduce after running bench build --apps gameplan
. Without a build it works well, but after the production build it's broken.
runtime-core.esm-bundler.js:262 TypeError: u is not a function
at Proxy.onClick (PageGrid.vue:13:12)
at onClick (Dialog.vue:206:34)
at runtime-dom.esm-bundler.js:711:60
at Ir (runtime-core.esm-bundler.js:195:19)
at gn (runtime-core.esm-bundler.js:202:17)
at gn (runtime-core.esm-bundler.js:212:17)
at HTMLButtonElement.n (runtime-dom.esm-bundler.js:693:5)
Fixed by:
diff --git a/frontend/src/pages/PageGrid.vue b/frontend/src/pages/PageGrid.vue
index 33ce698..fdc58df 100644
--- a/frontend/src/pages/PageGrid.vue
+++ b/frontend/src/pages/PageGrid.vue
@@ -22,9 +22,9 @@
actions: [
{
label: 'Delete',
- onClick: ({ close }) => {
+ async onClick(close) {
+ await $resources.pages.delete.submit(d.name)
close()
- return $resources.pages.delete.submit(d.name)
},
variant: 'solid',
theme: 'red',
(inspired by how its done in frappe/crm
)