@sealcode/sealgen 0.19.22 → 0.19.23

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,13 +79,13 @@ class StatefulPage extends Mountable {
79
79
  );
80
80
  }
81
81
  makeActionCallback(action_description, ...args) {
82
- return `(()=>{const form = this.closest('form'); form.action='${this.makeActionURL(
82
+ return `(()=>{const form = this.form; form.action='${this.makeActionURL(
83
83
  action_description,
84
84
  ...args
85
85
  )}'; form.requestSubmit()})()`;
86
86
  }
87
87
  rerender() {
88
- return "this.closest('form').requestSubmit()";
88
+ return "this.form.requestSubmit()";
89
89
  }
90
90
  async preprocessState(values) {
91
91
  return values;
@@ -187,9 +187,6 @@ class StatefulPage extends Mountable {
187
187
  ),
188
188
  page: this
189
189
  });
190
- console.debug("stateful-page.ts:320");
191
- console.log("NEW STATUS!!! AFTER ACTION");
192
- console.dir(new_state, { depth: 7 });
193
190
  ctx.body = this.render(ctx, new_state, inputs);
194
191
  } else {
195
192
  ctx.body = this.render(ctx, state, inputs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealcode/sealgen",
3
- "version": "0.19.22",
3
+ "version": "0.19.23",
4
4
  "description": "Module to automate adding routes and collections to a sealious application",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -173,14 +173,14 @@ export abstract class StatefulPage<
173
173
  | ActionName,
174
174
  ...args: ExtractStatefulPageActionArgs<Actions[ActionName]>
175
175
  ) {
176
- return `(()=>{const form = this.closest('form'); form.action='${this.makeActionURL(
176
+ return `(()=>{const form = this.form; form.action='${this.makeActionURL(
177
177
  action_description,
178
178
  ...args
179
179
  )}'; form.requestSubmit()})()`;
180
180
  }
181
181
 
182
182
  rerender() {
183
- return "this.closest('form').requestSubmit()";
183
+ return "this.form.requestSubmit()";
184
184
  }
185
185
 
186
186
  async preprocessState(values: State): Promise<State> {