@panneau/core 2.0.58 → 2.0.69

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.
package/es/hooks.js CHANGED
@@ -260,8 +260,11 @@ var useForm = function useForm() {
260
260
  }, [finalPostForm, action, value]);
261
261
  var onSubmit = useCallback(function (e) {
262
262
  e.preventDefault();
263
+ // This one is very important with multiple forms
264
+ // Nested forms (even in portals) will bubble the onSubmit event to the parent
265
+ e.stopPropagation();
263
266
  submit();
264
- }, [submit]);
267
+ }, [submit, action]);
265
268
  var status = null;
266
269
  if (requestState.loading) {
267
270
  status = 'loading';
package/lib/hooks.js CHANGED
@@ -295,8 +295,11 @@ var useForm = function useForm() {
295
295
  }, [finalPostForm, action, value]);
296
296
  var onSubmit = react.useCallback(function (e) {
297
297
  e.preventDefault();
298
+ // This one is very important with multiple forms
299
+ // Nested forms (even in portals) will bubble the onSubmit event to the parent
300
+ e.stopPropagation();
298
301
  submit();
299
- }, [submit]);
302
+ }, [submit, action]);
300
303
  var status = null;
301
304
  if (requestState.loading) {
302
305
  status = 'loading';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/core",
3
- "version": "2.0.58",
3
+ "version": "2.0.69",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -114,5 +114,5 @@
114
114
  "publishConfig": {
115
115
  "access": "public"
116
116
  },
117
- "gitHead": "73bfb739e4c3845e5a1bc031652cffc2cf80426c"
117
+ "gitHead": "270c1e84966861e94a390d20ee525c33f7edadb0"
118
118
  }