@dfosco/storyboard-react-reshaped 1.15.0 → 1.15.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfosco/storyboard-react-reshaped",
3
- "version": "1.15.0",
3
+ "version": "1.15.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  import { useRef, useCallback } from 'react'
2
2
  import { FormContext } from '@dfosco/storyboard-react'
3
- import { setParam } from '@dfosco/storyboard-core'
3
+ import { setParam, isHideMode, setShadow } from '@dfosco/storyboard-core'
4
4
 
5
5
  /**
6
6
  * A form wrapper that buffers input values locally and only
@@ -31,8 +31,9 @@ export default function StoryboardForm({ data, onSubmit, children, ...props }) {
31
31
  const handleSubmit = (e) => {
32
32
  e.preventDefault()
33
33
  if (prefix) {
34
+ const write = isHideMode() ? setShadow : setParam
34
35
  for (const [name, value] of Object.entries(draftsRef.current)) {
35
- setParam(`${prefix}.${name}`, value)
36
+ write(`${prefix}.${name}`, value)
36
37
  }
37
38
  }
38
39
  if (onSubmit) onSubmit(e)