@jsenv/navi 0.29.310 → 0.29.312
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/dist/dev/jsenv_navi.js +26 -1
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +23 -0
- package/dist/jsenv_navi.js.map +4 -4
- package/docs/actions.md +11 -4
- package/docs/data_states.md +5 -1
- package/package.json +1 -1
package/docs/actions.md
CHANGED
|
@@ -325,10 +325,17 @@ Which instance that is depends on whether the control carries a value:
|
|
|
325
325
|
what it runs **is** the instance it was handed. `useActionStatus` on that
|
|
326
326
|
instance sees the click, the run, the data.
|
|
327
327
|
- a control that **carries a value** — an input, a form — runs the child
|
|
328
|
-
instance bound to that value
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
328
|
+
instance bound to that value: the value merged over the params the caller
|
|
329
|
+
bound, and a value that is not an object **replaces them outright**. A
|
|
330
|
+
checkbox handed `ACTION.bindParams({ id })` runs `ACTION(true)`, and `id`
|
|
331
|
+
is gone — the call fails wherever it needed it, far from the binding that
|
|
332
|
+
lost it. Bind params to a control that holds a value only when the value
|
|
333
|
+
completes them (a form's object over a bound `{ id }`); when it would
|
|
334
|
+
replace them, pass a function and keep the params in its closure:
|
|
335
|
+
`action={() => ACTION({ id, sure: true })}`. Those params are not the
|
|
336
|
+
caller's, so neither is the status: the instance the caller holds stays idle
|
|
337
|
+
while the control's run moves. Read the effect where it lands (the store,
|
|
338
|
+
for a resource verb), or listen to the run itself, below.
|
|
332
339
|
|
|
333
340
|
Every control with an `action` reports the run it performs, whichever instance
|
|
334
341
|
that is:
|
package/docs/data_states.md
CHANGED
|
@@ -57,7 +57,11 @@ consequence: the component stays, so it is still there to offer the way out.
|
|
|
57
57
|
|
|
58
58
|
A component that delegates nothing needs no `<Loading>` above it. One that
|
|
59
59
|
delegates its wait does, since that is where the suspension lands, and navi says
|
|
60
|
-
so rather than leaving the subtree blank.
|
|
60
|
+
so rather than leaving the subtree blank. Inside a popup that boundary is the
|
|
61
|
+
popup's own — `{ loading: true }`, or a `<Loading>` inside the popup — never
|
|
62
|
+
the one above the page: a suspension landing there takes the popup away with
|
|
63
|
+
the page it copies, and the popup does not open at all (see
|
|
64
|
+
[popup_open.md](./popup_open.md#a-popup-that-loads-data)).
|
|
61
65
|
|
|
62
66
|
## `data` and `loading` are independent
|
|
63
67
|
|