reflectdb 0.2.0 → 0.3.0
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/README.md +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1002,6 +1002,7 @@ The action grammar is REST-shaped, so the attributes read like ordinary htmx:
|
|
|
1002
1002
|
GET reflect:<table> → render the collection view
|
|
1003
1003
|
GET reflect:<table>/:id → render one row
|
|
1004
1004
|
POST reflect:<table> → insert (row id from the body's `id`, else generated)
|
|
1005
|
+
a body `id` names the row; it is not stored as a column
|
|
1005
1006
|
PUT reflect:<table>/:id → update
|
|
1006
1007
|
PATCH reflect:<table>/:id → update
|
|
1007
1008
|
DELETE reflect:<table>/:id → delete
|
|
@@ -1017,6 +1018,8 @@ Worth knowing:
|
|
|
1017
1018
|
- Query params reach the view for filtering (`reflect:todos?done=false`); they do not change the server subscription. Declare that with `tables`, or with `reflect.sync.sync(table, { params })`.
|
|
1018
1019
|
- A row read whose row is missing answers `204`, leaving existing markup alone instead of blanking it.
|
|
1019
1020
|
- A view returns a raw HTML string — escape interpolated values yourself.
|
|
1021
|
+
- A bad action or an unregistered view answers 4xx/5xx, which htmx swaps nowhere by default, and a `reflect:` request never reaches the network tab. The adapter `console.error`s every one of them so the failure is not silent.
|
|
1022
|
+
- Checkboxes, radios and `<option>`s are re-synced from the rendered markup after a store-driven re-render. Once a user clicks one, the HTML spec stops letting the `checked`/`selected` attribute drive the property, and htmx's morph only fixes that up for `value` — so a peer's change would otherwise leave a ticked box on a row the store says is open.
|
|
1020
1023
|
|
|
1021
1024
|
## Whiteboard + Pictionary example
|
|
1022
1025
|
|
package/package.json
CHANGED